cubicweb/devtools/devctl.py
branch3.24
changeset 11818 fdc0a8260fd2
parent 11735 7a170207acbf
child 11822 adf0212d1dcc
--- a/cubicweb/devtools/devctl.py	Thu Nov 10 10:05:14 2016 +0100
+++ b/cubicweb/devtools/devctl.py	Wed Nov 09 23:00:00 2016 +0100
@@ -102,6 +102,7 @@
 
 def cleanup_sys_modules(config):
     # cleanup sys.modules, required when we're updating multiple cubes
+    appobjects_path = config.appobjects_path()
     for name, mod in list(sys.modules.items()):
         if mod is None:
             # duh ? logilab.common.os for instance
@@ -112,7 +113,7 @@
         if mod.__file__ is None:
             # odd/rare but real
             continue
-        for path in config.appobjects_path():
+        for path in appobjects_path:
             if mod.__file__.startswith(path):
                 del sys.modules[name]
                 break