Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
erp5
Commits
e3365241
Commit
e3365241
authored
2 years ago
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: change fromlist for __import__() in Python 3.
parent
63bb5033
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
product/ERP5Type/patches/DA.py
product/ERP5Type/patches/DA.py
+2
-1
product/ERP5Type/tests/runUnitTest.py
product/ERP5Type/tests/runUnitTest.py
+1
-1
No files found.
product/ERP5Type/patches/DA.py
View file @
e3365241
...
...
@@ -27,6 +27,7 @@ from zLOG import LOG, INFO, ERROR
from
io
import
BytesIO
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Utils
import
str2bytes
import
six
security
=
ClassSecurityInfo
()
DA
.
security
=
security
...
...
@@ -278,7 +279,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
:
...
...
This diff is collapsed.
Click to expand it.
product/ERP5Type/tests/runUnitTest.py
View file @
e3365241
...
...
@@ -305,7 +305,7 @@ class ERP5TypeTestLoader(unittest.TestLoader):
def
_importZodbTestComponent
(
self
,
name
):
import
erp5.component.test
module
=
__import__
(
'erp5.component.test.'
+
name
,
fromlist
=
[
'erp5.component.test'
],
fromlist
=
[
'erp5.component.test'
]
if
six
.
PY2
else
[
'erp5'
]
,
level
=
0
)
try
:
self
.
_test_component_ref_list
.
append
(
module
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment