Commit c8fb94ad authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not use _import_class but use __import__ directly, because class...

Do not use _import_class but use __import__ directly, because class initialization is not required for the bootstrap problem.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39389 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c458b79
......@@ -148,7 +148,10 @@ def portal_type_factory(portal_type_name):
# XXX heuristic: bootstrap issues should happen only inside ERP5Type.
if not path.startswith('Products.ERP5Type.'):
continue
klass = _import_class(path)
module_path, class_name = path.rsplit('.', 1)
module = __import__(module_path, {}, {}, (module_path,))
klass = getattr(module, class_name)
try:
try:
document_portal_type = getattr(klass, 'portal_type')
......
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