Commit ce7ad32c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

py3: StandardError does not exist.

parent c99d1956
......@@ -61,8 +61,7 @@ ACQUIRE_LOCAL_ROLE_GETTER_DICT = {
for acquire_local_role in (False, True)
}
if six.PY3:
StandardError = Exception
def _importFilesystemClass(classpath):
try:
module_path, class_name = classpath.rsplit('.', 1)
......@@ -74,7 +73,7 @@ def _importFilesystemClass(classpath):
InitializeClass(klass)
return klass
except StandardError:
except Exception as e:
raise ImportError('Could not import document class ' + classpath)
def _importComponentClass(component_package, name):
......
......@@ -1356,7 +1356,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
try:
portal_activities = self.portal.portal_activities
message_list = portal_activities.getMessageList()
except StandardError: # AttributeError, TransactionFailedError ...
except Exception: # AttributeError, TransactionFailedError ...
pass
else:
for m in message_list:
......
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