Commit 90d96834 authored by Nicolas Dumazet's avatar Nicolas Dumazet

use clearer newDynamicModule name


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39412 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f9c86401
...@@ -19,7 +19,7 @@ class DynamicModule(ModuleType): ...@@ -19,7 +19,7 @@ class DynamicModule(ModuleType):
setattr(self, name, obj) setattr(self, name, obj)
return obj return obj
def dynamicmodule(name, factory): def newDynamicModule(name, factory):
d = DynamicModule(name, factory) d = DynamicModule(name, factory)
sys.modules[name] = d sys.modules[name] = d
return d return d
...@@ -32,7 +32,7 @@ import inspect ...@@ -32,7 +32,7 @@ import inspect
from types import ModuleType from types import ModuleType
import dynamicmodule from dynamicmodule import newDynamicModule
import lazyclass import lazyclass
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
...@@ -249,8 +249,7 @@ def initializeDynamicModules(): ...@@ -249,8 +249,7 @@ def initializeDynamicModules():
erp5.filesystem_accessor_holder = ModuleType("erp5.filesystem_accessor_holder") erp5.filesystem_accessor_holder = ModuleType("erp5.filesystem_accessor_holder")
sys.modules["erp5.filesystem_accessor_holder"] = erp5.filesystem_accessor_holder sys.modules["erp5.filesystem_accessor_holder"] = erp5.filesystem_accessor_holder
# FIXME: JPS: rename to dynamic_module.newDynamicModule()? portal_type_container = newDynamicModule('erp5.portal_type',
portal_type_container = dynamicmodule.dynamicmodule('erp5.portal_type',
portal_type_loader) portal_type_loader)
erp5.portal_type = portal_type_container erp5.portal_type = portal_type_container
...@@ -288,7 +287,7 @@ def initializeDynamicModules(): ...@@ -288,7 +287,7 @@ def initializeDynamicModules():
setattr(TempDocument, '%s__roles__' % method_id, None) setattr(TempDocument, '%s__roles__' % method_id, None)
return TempDocument return TempDocument
erp5.temp_portal_type = dynamicmodule.dynamicmodule('erp5.temp_portal_type', erp5.temp_portal_type = newDynamicModule('erp5.temp_portal_type',
temp_portal_type_loader) temp_portal_type_loader)
def _clearAccessorHolderModule(module): def _clearAccessorHolderModule(module):
......
...@@ -965,8 +965,8 @@ def importLocalDocument(class_id, document_path = None): ...@@ -965,8 +965,8 @@ def importLocalDocument(class_id, document_path = None):
return MigrateMe return MigrateMe
else: else:
return klass return klass
from Dynamic.dynamicmodule import dynamicmodule from Dynamic.dynamicmodule import newDynamicModule
document_module = dynamicmodule(module_name, migrate_me_document_loader) document_module = newDynamicModule(module_name, migrate_me_document_loader)
setattr(Products.ERP5Type.Document, class_id, document_module) setattr(Products.ERP5Type.Document, class_id, document_module)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment