diff options
author | Thomas Kluyver <takowl@gmail.com> | 2013-12-13 09:53:11 -0800 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2013-12-13 09:53:11 -0800 |
commit | dbfa82fc05c321b2d278bfd9e266d7ceb77f851f (patch) | |
tree | b0dd5706efd6949698f2d76c1c2c972f1c5cce74 /examples/astat.py | |
parent | 6c88ef71a3fd9ffa1a7fd4f23c857031506e5161 (diff) | |
download | pexpect-git-dbfa82fc05c321b2d278bfd9e266d7ceb77f851f.tar.gz |
Don't catch unhandled exceptions in examples.
Let Python handle printing a traceback and exiting in these cases.
Diffstat (limited to 'examples/astat.py')
-rwxr-xr-x | examples/astat.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/examples/astat.py b/examples/astat.py index 100b9d3..ef5c3a9 100755 --- a/examples/astat.py +++ b/examples/astat.py @@ -35,7 +35,6 @@ from __future__ import print_function from __future__ import absolute_import import os, sys, time, re, getopt, getpass -import traceback import pexpect, pxssh @@ -94,10 +93,4 @@ def main(): print(requests_per_second) if __name__ == "__main__": - try: - main() - except Exception as e: - print(str(e)) - traceback.print_exc() - os._exit(1) - + main() |