Python 3: Convert except ExceptClass, Target: to except ExceptClass as Target:

This commit is contained in:
Labrys 2016-06-04 23:17:50 -04:00
parent 5903538ae5
commit ec71e7806d
7 changed files with 28 additions and 28 deletions

View file

@ -64,7 +64,7 @@ def rename_file(filename, newfilePath):
logger.debug("Replacing file name %s with download name %s" % (filename, newfilePath), "EXCEPTION")
try:
os.rename(filename, newfilePath)
except Exception, e:
except Exception as e:
logger.error("Unable to rename file due to: %s" % (str(e)), "EXCEPTION")
@ -132,7 +132,7 @@ def rename_script(dirname):
logger.debug("Renaming file %s to %s" % (orig, dest), "EXCEPTION")
try:
os.rename(orig, dest)
except Exception, e:
except Exception as e:
logger.error("Unable to rename file due to: %s" % (str(e)), "EXCEPTION")
# dict for custom groups