diff options
-rw-r--r-- | logilab/common/registry.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/logilab/common/registry.py b/logilab/common/registry.py index 83f467b..07d4353 100644 --- a/logilab/common/registry.py +++ b/logilab/common/registry.py @@ -704,6 +704,9 @@ class RegistryStore(dict): toload = [] for modname in modnames: filepath = pkgutil.find_loader(modname).get_filename() + if filepath[-4:] in ('.pyc', '.pyo'): + # The source file *must* exists + filepath = filepath[:-1] self._toloadmods[modname] = filepath toload.append((filepath, modname)) for filepath, modname in toload: |