changeset 4031:68951e8e069d

plugin module loader: fix _plugin_modules list for the case when module was already loaded before
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 24 Aug 2008 17:53:55 +0200
parents 3d5c4ebe8f34
children 070d03f8fd7b
files MoinMoin/config/multiconfig.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sun Aug 24 16:35:51 2008 +0200
+++ b/MoinMoin/config/multiconfig.py	Sun Aug 24 17:53:55 2008 +0200
@@ -591,11 +591,12 @@
                             # Load the module and set in sys.modules
                             module = imp.load_module(modname, fp, path, info)
                             setattr(sys.modules[self.siteid], 'csum', module)
-                            self._plugin_modules.append(modname)
                         finally:
                             # Make sure fp is closed properly
                             if fp:
                                 fp.close()
+                    if modname not in self._plugin_modules:
+                        self._plugin_modules.append(modname)
             finally:
                 imp.release_lock()
         except ImportError, err: