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

py3: StandardError does not exist.

parent 364d890d
...@@ -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):
......
...@@ -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:
......
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