Evaluate if the as works in python 2 and implement if it does, e.g. replase the Excetion, with Exception as
can easily be done in pycharme with replace in path
When you capture exceptions, use the as keyword:
try:
...
except MyException as exc:
...
This older syntax was removed in Python 3:
try:
...
except MyException, exc: # Don't do that!
...
Evaluate if the as works in python 2 and implement if it does, e.g. replase the Excetion, with Exception as can easily be done in pycharme with replace in path
When you capture exceptions, use the as keyword:
try: ... except MyException as exc: ... This older syntax was removed in Python 3:
try: ... except MyException, exc: # Don't do that! ...