1728 # search the path for the module |
1728 # search the path for the module |
1729 path = [] if path is None else path[:] |
1729 path = [] if path is None else path[:] |
1730 f = None |
1730 f = None |
1731 if inpackage: |
1731 if inpackage: |
1732 try: |
1732 try: |
1733 f, file, (suff, mode, moduleType) = find_module(module, path, _extensions) |
1733 f, file, (_suff, _mode, moduleType) = find_module(module, path, _extensions) |
1734 except ImportError: |
1734 except ImportError: |
1735 f = None |
1735 f = None |
1736 if f is None: |
1736 if f is None: |
1737 fullpath = path[:] + sys.path[:] |
1737 fullpath = path[:] + sys.path[:] |
1738 f, file, (suff, mode, moduleType) = find_module(module, fullpath, _extensions) |
1738 f, file, (_suff, _mode, moduleType) = find_module(module, fullpath, _extensions) |
1739 if f: |
1739 if f: |
1740 f.close() |
1740 f.close() |
1741 if moduleType not in SUPPORTED_TYPES: |
1741 if moduleType not in SUPPORTED_TYPES: |
1742 # not supported source, can't do anything with this module |
1742 # not supported source, can't do anything with this module |
1743 _modules[modname] = Module(modname, None, None) |
1743 _modules[modname] = Module(modname, None, None) |