Old exception handling format to new one

This commit is contained in:
Miroslav Stampar
2019-01-22 14:09:13 +01:00
parent ba356baab0
commit bdc4457f34
11 changed files with 26 additions and 27 deletions

View File

@@ -61,8 +61,8 @@ def main():
if not args.inputFile:
parser.error('Missing the input file, -h for help')
except (OptionError, TypeError), e:
parser.error(e)
except (OptionError, TypeError) as ex:
parser.error(ex)
if not os.path.isfile(args.inputFile):
print('ERROR: the provided input file \'%s\' is non existent' % args.inputFile)