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/monitor.py | |
| parent | 6c88ef71a3fd9ffa1a7fd4f23c857031506e5161 (diff) | |
| download | pexpect-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/monitor.py')
| -rwxr-xr-x | examples/monitor.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/monitor.py b/examples/monitor.py index 1504bbd..9cb0eaf 100755 --- a/examples/monitor.py +++ b/examples/monitor.py @@ -46,7 +46,6 @@ from __future__ import print_function from __future__ import absolute_import import os, sys, re, getopt, getpass -import traceback import pexpect @@ -227,11 +226,4 @@ def main(): child.expect(EOF) if __name__ == "__main__": - - try: - main() - except Exception as e: - print(str(e)) - traceback.print_exc() - os._exit(1) - + main() |
