diff options
author | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-20 20:25:08 (GMT) |
commit | 63f0cf084077bdfe165a899175deca24a0f783e5 (patch) | |
tree | 54f828e201301ea1dd02f010e5b6eae3bae3c780 /Lib/rexec.py | |
parent | 422869a75ca4e56b89895da7c25369b6b6d9dbec (diff) | |
download | cpython-63f0cf084077bdfe165a899175deca24a0f783e5.zip cpython-63f0cf084077bdfe165a899175deca24a0f783e5.tar.gz cpython-63f0cf084077bdfe165a899175deca24a0f783e5.tar.bz2 |
delattr() can raise AttributeError, not KeyError.
Use keyword arg to set verbose flag in test func.
Diffstat (limited to 'Lib/rexec.py')
-rw-r--r-- | Lib/rexec.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py index 3f34153..860aab2 100644 --- a/Lib/rexec.py +++ b/Lib/rexec.py @@ -229,7 +229,7 @@ class RExec(ihooks._Verbose): for name in exceptions: try: delattr(dst, name) - except KeyError: + except AttributeError: pass return dst @@ -356,7 +356,7 @@ class RExec(ihooks._Verbose): def test(): import traceback - r = RExec(None, '-v' in sys.argv[1:]) + r = RExec(verbose=('-v' in sys.argv[1:])) print "*** RESTRICTED *** Python", sys.version print sys.copyright while 1: |