Ticket #15525: module_loading.patch

File module_loading.patch, 763 bytes (added by Dmitry Trofimov, 14 years ago)
  • django/utils/module_loading.py

     
    1414    for finder in sys.meta_path:
    1515        if finder.find_module(name):
    1616            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:
    1923            # Try the cached finder.
    2024            finder = sys.path_importer_cache[entry]
    2125            if finder is None:
Back to Top