diff --git a/mitogen/master.py b/mitogen/master.py index c6c04d7d..cb85f33e 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -363,6 +363,9 @@ class ModuleFinder(object): fp.close() def _py_filename(self, path): + if not path: + return None + if path[-4:] in ('.pyc', '.pyo'): path = path.rstrip('co')