aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Varner <fuzzyray@gentoo.org>2011-01-06 08:22:07 -0600
committerPaul Varner <fuzzyray@gentoo.org>2011-01-06 09:48:52 -0600
commit63a5ccffaba120850b35814986e37c004c012de6 (patch)
tree5a113b5c0ce57de5d7064c24567734ca7bd2144f /bin
parentman page formatting cleanup. (diff)
downloadgentoolkit-63a5ccffaba120850b35814986e37c004c012de6.tar.gz
gentoolkit-63a5ccffaba120850b35814986e37c004c012de6.tar.bz2
gentoolkit-63a5ccffaba120850b35814986e37c004c012de6.zip
Add gentoolkitNonZeroExit exception
This exception should only be used when an error is not fatal and the absence of information means no data was found. The return_code parameter can be used to set the exit value. Have the equery list module when in quiet mode return an exit status of 3. This is needed to prevent 'euse -I' from printing many 'No installed packages matching ...' error messages.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/equery2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/equery b/bin/equery
index 54c3a07..343f92d 100755
--- a/bin/equery
+++ b/bin/equery
@@ -36,6 +36,8 @@ from gentoolkit import equery, errors
try:
equery.main()
+except errors.GentoolkitNonZeroExit as err:
+ sys.exit(err.return_code)
except errors.GentoolkitException as err:
if '--debug' in sys.argv or bool(os.getenv('DEBUG', False)):
raise