diff options
author | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2007-11-28 23:40:34 +0000 |
---|---|---|
committer | noah <noah@656d521f-e311-0410-88e0-e7920216d269> | 2007-11-28 23:40:34 +0000 |
commit | eb46aa8d11978f102dbb88ca6ba7d9410dc7a37c (patch) | |
tree | 204c6d0109ae2c6e06bec5785eb82d1c74e20b05 /pexpect/examples/topip.py | |
parent | 1947b3f73dce75c3d298b67fd2445ca937af0a91 (diff) | |
download | pexpect-eb46aa8d11978f102dbb88ca6ba7d9410dc7a37c.tar.gz |
Updated examples with a cleaner script style and doc strings.
git-svn-id: http://pexpect.svn.sourceforge.net/svnroot/pexpect/trunk@489 656d521f-e311-0410-88e0-e7920216d269
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() |