From f4bc045a1a0bf07f12f75ddd189a0fad6c7f4c6d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 27 Jan 2007 04:49:42 +0000 Subject: [PATCH] if requested argv cannot be matched to anything, exit with non-zero status svn path=/main/trunk/; revision=5791 --- bin/portageq | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.26.2