python3 - 'as' needed in exceptions instead of comma

This commit is contained in:
c-holtermann
2019-04-04 17:32:14 +02:00
parent 0068475bb1
commit 64a01f3027

View File

@@ -14,7 +14,7 @@ FILE_2 = "/tmp/example_file.xac"
session = None
try:
session = Session(FILE_1)
except GnuCashBackendException, backend_exception:
except GnuCashBackendException as backend_exception:
assert( ERR_FILEIO_FILE_NOT_FOUND in backend_exception.errors)
@@ -28,7 +28,7 @@ session.destroy()
session = Session(FILE_2)
try:
session_2 = Session(FILE_2)
except GnuCashBackendException, backend_exception:
except GnuCashBackendException as backend_exception:
assert( ERR_BACKEND_LOCKED in backend_exception.errors )
session.end()
session.destroy()