From: Zac Medico Date: Sat, 18 Jun 2011 17:53:42 +0000 (-0700) Subject: portageq: fix all_best_visible to fail early X-Git-Tag: v2.2.0_alpha42~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fed6021192dd59eda1f6b9f3fb227597a83870de;p=portage.git portageq: fix all_best_visible to fail early This will fix bug #372193. --- 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): """ 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))