summaryrefslogtreecommitdiffstats
path: root/bin/portageq
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-18 10:53:42 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-18 10:53:42 -0700
commitfed6021192dd59eda1f6b9f3fb227597a83870de (patch)
treea44a71efa42509d313eef29eaeecb4a7b1cd0b5e /bin/portageq
parentd3d1aee93c9c5f04612c9237d452e9885c10af6d (diff)
downloadportage-fed6021192dd59eda1f6b9f3fb227597a83870de.tar.gz
portage-fed6021192dd59eda1f6b9f3fb227597a83870de.tar.bz2
portage-fed6021192dd59eda1f6b9f3fb227597a83870de.zip
portageq: fix all_best_visible to fail early
This will fix bug #372193.
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/portageq b/bin/portageq
index fa713889a..a13ca998c 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -461,9 +461,11 @@ def all_best_visible(argv):
"""<root>
Returns all best_visible packages (without .ebuild).
"""
- if (len(argv) < 1):
- print("ERROR: insufficient parameters!")
-
+ if len(argv) < 1:
+ sys.stderr.write("ERROR: insufficient parameters!\n")
+ sys.stderr.flush()
+ return 2
+
#print portage.db[argv[0]]["porttree"].dbapi.cp_all()
for pkg in portage.db[argv[0]]["porttree"].dbapi.cp_all():
mybest=portage.best(portage.db[argv[0]]["porttree"].dbapi.match(pkg))