diff options
author | Ricardo Band | 2017-01-18 14:31:54 +0100 |
---|---|---|
committer | Ricardo Band | 2017-01-18 14:31:54 +0100 |
commit | 853c4741f5c9f916d043bba00511863d1220c28c (patch) | |
tree | 546895d5a59b00015a30e7b95cc7bd94523dc822 /pac | |
parent | 403a58ec3606583aa6d34a7bd750712bf52ff93f (diff) | |
download | aur-853c4741f5c9f916d043bba00511863d1220c28c.tar.gz |
fixed a bug when a package with the exact name couldn't be found but other that supply the package virtually
Diffstat (limited to 'pac')
-rwxr-xr-x | pac | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -17,7 +17,7 @@ __maintainer__ = 'Ricardo Band' __email__ = 'email@ricardo.band' import sys -from subprocess import check_output, call +from subprocess import call, run, PIPE def search(search_term: str) -> list: @@ -51,7 +51,8 @@ def search(search_term: str) -> list: """ result: List[dict] = [] - out: str = check_output(['pacaur', '-Ss', search_term]) + p = run(['pacaur', '-Ss', search_term], stdout=PIPE) + out: str = p.stdout.decode() entry: dict = {} for line in out.decode().split('\n'): @@ -148,7 +149,7 @@ def install(numbers: list, packages: list): Gets the chosen packages and concatinates them. Then executes the pacaur command with the packages to install them. """ names = [packages[i]['package'] for i in numbers] - call('pacaur -S %s' % ' '.join(names), shell=True) + call(f"pacaur -S {' '.join(names)}", shell=True) if __name__ == '__main__': |