diff options
Diffstat (limited to 'pexpect/examples/topip.py')
-rwxr-xr-x | pexpect/examples/topip.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pexpect/examples/topip.py b/pexpect/examples/topip.py index ec38d32..4d5b190 100755 --- a/pexpect/examples/topip.py +++ b/pexpect/examples/topip.py @@ -55,6 +55,7 @@ TOPIP_LOG_FILE = '/var/log/topip.log' TOPIP_LAST_RUN_STATS = '/var/run/topip.last' def exit_with_usage(): + print globals()['__doc__'] os._exit(1) @@ -256,6 +257,9 @@ def main(): if __name__ == '__main__': try: main() + sys.exit(0) + except SystemExit, e: + raise e except Exception, e: print str(e) traceback.print_exc() |