[Zope-CVS] SVN: zpkgtools/trunk/zpkgtools/app.py only print the SystemExit message if there is one; do not print a simple

Fred L. Drake, Jr. fdrake at gmail.com
Tue Aug 23 01:22:20 EDT 2005


Log message for revision 38031:
  only print the SystemExit message if there is one; do not print a simple
  exit code
  

Changed:
  U   zpkgtools/trunk/zpkgtools/app.py

-=-
Modified: zpkgtools/trunk/zpkgtools/app.py
===================================================================
--- zpkgtools/trunk/zpkgtools/app.py	2005-08-22 22:13:00 UTC (rev 38030)
+++ zpkgtools/trunk/zpkgtools/app.py	2005-08-23 05:22:19 UTC (rev 38031)
@@ -643,8 +643,11 @@
     try:
         options = parse_args(argv)
     except SystemExit, e:
-        print >>sys.stderr, e
-        return 2
+        if e.code is None or isinstance(e.code, int):
+            return 0
+        else:
+            print >>sys.stderr, e
+            return 2
 
     try:
         app = BuilderApplication(options)



More information about the Zope-CVS mailing list