initialize_sys_path()
try:
mod_path = get_module_path(module_name)
- zip_mod_path = mod_path + '.zip'
+ zip_mod_path = '' if not mod_path else mod_path + '.zip'
if not os.path.isfile(zip_mod_path):
__import__('openerp.addons.' + module_name)
else:
del cls.registries[db_name]
raise
+ # load_modules() above can replace the registry by calling
+ # indirectly new() again (when modules have to be uninstalled).
+ # Yeah, crazy.
+ registry = cls.registries[db_name]
+
cr = registry.db.cursor()
try:
Registry.setup_multi_process_signaling(cr)