Old style exceptions --> new style for Python 3

This commit is contained in:
cclauss
2019-01-17 15:42:05 +01:00
parent 9a5b2108b8
commit c0c935b685
24 changed files with 60 additions and 58 deletions

View File

@@ -97,7 +97,7 @@ class CommandsTestBase(SharedModuleStoreTestCase):
try:
output = self.call_command('dump_course_structure', *args, **kwargs)
except TypeError, exception:
except TypeError as exception:
self.fail(exception)
dump = json.loads(output)

View File

@@ -285,7 +285,7 @@ def _add_timed_exam_info(user, course, section, section_context):
unicode(course.id),
unicode(section.location)
)
except Exception, ex: # pylint: disable=broad-except
except Exception as ex: # pylint: disable=broad-except
# safety net in case something blows up in edx_proctoring
# as this is just informational descriptions, it is better
# to log and continue (which is safe) than to have it be an