mirror of
https://github.com/python/cpython.git
synced 2024-11-28 08:20:55 +01:00
delattr() can raise AttributeError, not KeyError.
Use keyword arg to set verbose flag in test func.
This commit is contained in:
parent
422869a75c
commit
63f0cf0840
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user