From 3c3eadfb8ecc2ce5b3eb2c1fa93404193453f49e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Jun 2007 00:18:41 +0000 Subject: [PATCH] if requested argv cannot be matched to anything, exit with non-zero status (trunk r5791) svn path=/main/branches/2.1.2/; revision=6924 --- bin/portageq | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/portageq b/bin/portageq index 1a59af8bc..6147e5627 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