| 389 |
|
if reload:
|
| 390 |
|
exec co in sys.modules[fqname].__dict__
|
| 391 |
|
else:
|
| 392 |
|
exec co in mod.__dict__
|
| |
394 |
try:
|
| |
395 |
if reload:
|
| |
396 |
exec co in sys.modules[fqname].__dict__
|
| |
397 |
else:
|
| |
398 |
exec co in mod.__dict__
|
| |
399 |
except:
|
| |
400 |
# In Python 2.4 and above, sys.modules is left clean
|
| |
401 |
# after a broken import. We need to do the same to
|
| |
402 |
# achieve perfect compatibility (see ticket #32).
|
| |
403 |
if py_version >= (2,4,0):
|
| |
404 |
# FIXME: how can we recover from a broken reload()?
|
| |
405 |
# Should we save the mod dict and restore it in case
|
| |
406 |
# of failure?
|
| |
407 |
if not reload:
|
| |
408 |
del sys.modules[fqname]
|
| |
409 |
raise
|