mirror of
https://github.com/kennethreitz-archive/pyinstaller.git
synced 2026-06-05 23:50:17 +00:00
Avoid raising an exception within an except clause that will re-raise
git-svn-id: http://svn.pyinstaller.org/trunk@816 8dd32b29-ccff-0310-8a9a-9233e24343b1
This commit is contained in:
@@ -528,13 +528,10 @@ class ImportManager:
|
||||
# Should we save the mod dict and restore it in case
|
||||
# of failure?
|
||||
if not reload:
|
||||
try:
|
||||
del sys.modules[fqname]
|
||||
except KeyError:
|
||||
# Some modules (eg: dbhash.py) cleanup
|
||||
# sys.modules themselves. We should then
|
||||
# be lenient and avoid errors.
|
||||
pass
|
||||
# Some modules (eg: dbhash.py) cleanup
|
||||
# sys.modules themselves. We should then
|
||||
# be lenient and avoid errors.
|
||||
sys.modules.pop(fqname, None)
|
||||
if hasattr(parent, nm):
|
||||
delattr(parent, nm)
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user