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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
87f6c14c
Commit
87f6c14c
authored
Sep 29, 2022
by
Kazuhiko Shiozaki
Committed by
Jérome Perrin
Dec 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py3: StandardError does not exist.
parent
364d890d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
product/ERP5Type/dynamic/portal_type_class.py
product/ERP5Type/dynamic/portal_type_class.py
+2
-3
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+1
-1
No files found.
product/ERP5Type/dynamic/portal_type_class.py
View file @
87f6c14c
...
@@ -61,8 +61,7 @@ ACQUIRE_LOCAL_ROLE_GETTER_DICT = {
...
@@ -61,8 +61,7 @@ ACQUIRE_LOCAL_ROLE_GETTER_DICT = {
for
acquire_local_role
in
(
False
,
True
)
for
acquire_local_role
in
(
False
,
True
)
}
}
if
six
.
PY3
:
StandardError
=
Exception
def
_importFilesystemClass
(
classpath
):
def
_importFilesystemClass
(
classpath
):
try
:
try
:
module_path
,
class_name
=
classpath
.
rsplit
(
'.'
,
1
)
module_path
,
class_name
=
classpath
.
rsplit
(
'.'
,
1
)
...
@@ -74,7 +73,7 @@ def _importFilesystemClass(classpath):
...
@@ -74,7 +73,7 @@ def _importFilesystemClass(classpath):
InitializeClass
(
klass
)
InitializeClass
(
klass
)
return
klass
return
klass
except
StandardError
:
except
Exception
as
e
:
raise
ImportError
(
'Could not import document class '
+
classpath
)
raise
ImportError
(
'Could not import document class '
+
classpath
)
def
_importComponentClass
(
component_package
,
name
):
def
_importComponentClass
(
component_package
,
name
):
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
87f6c14c
...
@@ -1356,7 +1356,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
...
@@ -1356,7 +1356,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
try
:
try
:
portal_activities
=
self
.
portal
.
portal_activities
portal_activities
=
self
.
portal
.
portal_activities
message_list
=
portal_activities
.
getMessageList
()
message_list
=
portal_activities
.
getMessageList
()
except
StandardError
:
# AttributeError, TransactionFailedError ...
except
Exception
:
# AttributeError, TransactionFailedError ...
pass
pass
else
:
else
:
for
m
in
message_list
:
for
m
in
message_list
:
...
...
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