Ticket #15525: module_loading.patch
File module_loading.patch, 763 bytes (added by , 14 years ago) |
---|
-
django/utils/module_loading.py
14 14 for finder in sys.meta_path: 15 15 if finder.find_module(name): 16 16 return True 17 for entry in package.__path__: # No __path__, then not a package. 18 try: 17 try: 18 path = package.__path__ # No __path__, then not a package. 19 except AttributeError: 20 raise ImportError("%s is not a package." % package.__name__) 21 for entry in path: 22 try: 19 23 # Try the cached finder. 20 24 finder = sys.path_importer_cache[entry] 21 25 if finder is None: