summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Arteaga <andyspiros@gmail.com>2011-08-20 01:18:54 +0200
committerAndrea Arteaga <andyspiros@gmail.com>2011-08-20 01:18:54 +0200
commitfacec2be06cd0eb883afd717238122eeac8bbecb (patch)
tree2a8362ffad0e90c9c2894ba39c67a06d6c36fb37
parentAdded purge. Added -N to BTL for samples num. (diff)
downloadauto-numerical-bench-facec2be06cd0eb883afd717238122eeac8bbecb.tar.gz
auto-numerical-bench-facec2be06cd0eb883afd717238122eeac8bbecb.tar.bz2
auto-numerical-bench-facec2be06cd0eb883afd717238122eeac8bbecb.zip
Solved bug with PortageUtils.
-rw-r--r--numbench/PortageUtils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/numbench/PortageUtils.py b/numbench/PortageUtils.py
index f06c53d..0aad4b1 100644
--- a/numbench/PortageUtils.py
+++ b/numbench/PortageUtils.py
@@ -66,7 +66,10 @@ def get_dependencies(package, env={}, split=False):
pkg = normalize_cpv(package)
cmd = ['emerge', '--ignore-default-opts', '='+pkg, '-poq']
proc = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE, env=env)
- lines = proc.communicate()[0].strip().split('\n')
+ output = proc.communicate()[0]
+ if proc.returncode != 0:
+ return []
+ lines = output.strip().split('\n')
if not lines[0]:
return []
if split: