fix bug in reload

This commit is contained in:
Guido van Rossum 1995-08-09 02:32:49 +00:00
parent bebe5157a5
commit 6a0691aee4
1 changed files with 1 additions and 0 deletions

View File

@ -319,6 +319,7 @@ class ModuleImporter(_Verbose):
return self.loader.load_module(name, stuff)
def reload(self, module, path = None):
name = module.__name__
stuff = self.loader.find_module(name, path)
if not stuff:
raise ImportError, "Module %s not found for reload" % name