# HG changeset patch # User Aurelien Campeas # Date 1313756706 -7200 # Node ID df91baa5b837af6857a527ab60b05efa5d12cb28 # Parent 50f89f05ae0a62ea64fc2644439a8ff609d3f2d9 [devctl] do not crash in the (rare, odd) case where mod.__file__ is None (closes #1908664) diff -r 50f89f05ae0a -r df91baa5b837 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]