summaryrefslogtreecommitdiff
path: root/examples/astat.py
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-12-13 09:53:11 -0800
committerThomas Kluyver <takowl@gmail.com>2013-12-13 09:53:11 -0800
commitdbfa82fc05c321b2d278bfd9e266d7ceb77f851f (patch)
treeb0dd5706efd6949698f2d76c1c2c972f1c5cce74 /examples/astat.py
parent6c88ef71a3fd9ffa1a7fd4f23c857031506e5161 (diff)
downloadpexpect-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-xexamples/astat.py9
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()