[Python-checkins] r61611 - doctools/trunk/sphinx/__init__.py
georg.brandl
python-checkins at python.org
Wed Mar 19 08:39:25 CET 2008
Author: georg.brandl
Date: Wed Mar 19 08:39:24 2008
New Revision: 61611
Modified:
doctools/trunk/sphinx/__init__.py
Log:
Return an exit status != 0 on error.
Modified: doctools/trunk/sphinx/__init__.py
==============================================================================
--- doctools/trunk/sphinx/__init__.py (original)
+++ doctools/trunk/sphinx/__init__.py Wed Mar 19 08:39:24 2008
@@ -121,6 +121,11 @@
app.builder.build_specific(filenames)
else:
app.builder.build_update()
+ except KeyboardInterrupt:
+ # catches BaseExceptions in 2.5 -- SystemExit, KeyboardInterrupt
+ return 1
+ except SystemExit:
+ return 0
except Exception, err:
if use_pdb:
import pdb
@@ -143,9 +148,7 @@
'error, so that a better error message '
'can be provided next time.')
print >>sys.stderr, 'Send reports to georg at python.org. Thanks!'
- except:
- # catches BaseExceptions in 2.5 -- SystemExit, KeyboardInterrupt
- pass
+ return 1
if __name__ == '__main__':
More information about the Python-checkins
mailing list