Commit e8d12e20 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

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

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