1.1 --- a/importer.py Tue Dec 06 17:55:55 2016 +0100
1.2 +++ b/importer.py Tue Dec 06 18:12:02 2016 +0100
1.3 @@ -774,18 +774,20 @@
1.4 path_so_far.append(p)
1.5 module_name = ".".join(path_so_far)
1.6
1.7 + # Return None if the module could not be located.
1.8 +
1.9 if not m:
1.10 if self.verbose:
1.11 print >>sys.stderr, "Not found (%s)" % name
1.12 + return None
1.13
1.14 - return None # NOTE: Import error.
1.15 -
1.16 - # Get the module itself.
1.17 + # Get the directory and module filename.
1.18
1.19 d, filename = m
1.20 - module = self.load_from_file(filename, module_name)
1.21
1.22 - return module
1.23 + # Get the module itself.
1.24 +
1.25 + return self.load_from_file(filename, module_name)
1.26
1.27 def load_from_file(self, filename, module_name=None):
1.28