[devctl] do not crash in the (rare, odd) case where mod.__file__ is None (closes #1908664) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 19 Aug 2011 14:25:06 +0200
branchstable
changeset 7752 df91baa5b837
parent 7751 50f89f05ae0a
child 7754 e3da9e7fc584
[devctl] do not crash in the (rare, odd) case where mod.__file__ is None (closes #1908664)
devtools/devctl.py
--- a/devtools/devctl.py	Fri Aug 19 10:53:23 2011 +0200
+++ b/devtools/devctl.py	Fri Aug 19 14:25:06 2011 +0200
@@ -88,6 +88,9 @@
             continue
         if not hasattr(mod, '__file__'):
             continue
+        if mod.__file__ is None:
+            # odd/rare but real
+            continue
         for path in config.vregistry_path():
             if mod.__file__.startswith(path):
                 del sys.modules[name]