Commit e0a93db1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

py2/py3: change fromlist for __import__() in Python 3.

parent 5e3cc58c
...@@ -30,6 +30,7 @@ from Acquisition import aq_base, aq_parent ...@@ -30,6 +30,7 @@ from Acquisition import aq_base, aq_parent
from zLOG import LOG, INFO, ERROR from zLOG import LOG, INFO, ERROR
from io import BytesIO from io import BytesIO
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
import six
security = ClassSecurityInfo() security = ClassSecurityInfo()
DA.security = security DA.security = security
...@@ -279,7 +280,7 @@ def getObjectMeta(original_function): ...@@ -279,7 +280,7 @@ def getObjectMeta(original_function):
# imported, which is enough to use a ZODB Extension as a brain. # imported, which is enough to use a ZODB Extension as a brain.
try: try:
m = __import__('erp5.component.extension.%s' % module, globals(), m = __import__('erp5.component.extension.%s' % module, globals(),
{}, 'erp5.component.extension') {}, ['erp5.component.extension'] if six.PY2 else ['erp5'])
o = getattr(m, name, None) o = getattr(m, name, None)
if o is None: if o is None:
......
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