Kaydet (Commit) b428f47c authored tarafından Brett Cannon's avatar Brett Cannon

Don't overwrite a __path__ value from extension modules if already

set.
üst a6e85814
......@@ -1108,7 +1108,7 @@ class ExtensionFileLoader:
module = _call_with_frames_removed(_imp.load_dynamic,
fullname, self.path)
_verbose_message('extension module loaded from {!r}', self.path)
if self.is_package(fullname):
if self.is_package(fullname) and not hasattr(module, '__path__'):
module.__path__ = [_path_split(self.path)[0]]
return module
except:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment