aboutsummarylogtreecommitdiffstats
path: root/pac
diff options
context:
space:
mode:
authorRicardo Band2017-01-18 14:31:54 +0100
committerRicardo Band2017-01-18 14:31:54 +0100
commit853c4741f5c9f916d043bba00511863d1220c28c (patch)
tree546895d5a59b00015a30e7b95cc7bd94523dc822 /pac
parent403a58ec3606583aa6d34a7bd750712bf52ff93f (diff)
downloadaur-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-xpac7
1 files changed, 4 insertions, 3 deletions
diff --git a/pac b/pac
index c45a0d82a9a6..150a776fb0d5 100755
--- a/pac
+++ b/pac
@@ -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__':