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

"Fred L. Drake, Jr." <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
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)

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.