From: Mike Frysinger Date: Sat, 27 Jan 2007 04:49:42 +0000 (-0000) Subject: if requested argv cannot be matched to anything, exit with non-zero status X-Git-Tag: v2.2_pre1~1801 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f4bc045a1a0bf07f12f75ddd189a0fad6c7f4c6d;p=portage.git if requested argv cannot be matched to anything, exit with non-zero status svn path=/main/trunk/; revision=5791 --- diff --git a/bin/portageq b/bin/portageq index c3adf9114..8a70bed87 100755 --- a/bin/portageq +++ b/bin/portageq @@ -133,7 +133,12 @@ def best_visible(argv): sys.exit(2) try: mylist=portage.db[argv[0]]["porttree"].dbapi.match(argv[1]) - print portage.best(mylist) + visible=portage.best(mylist) + if visible: + print visible + sys.exit(0) + else: + sys.exit(1) except KeyError: sys.exit(1) best_visible.uses_root = True