mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Old exception handling format to new one
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -88,8 +88,8 @@ if __name__ == "__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)
|
||||
|
||||
inputFile = args.inputFile
|
||||
outputFile = args.outputFile
|
||||
|
||||
@@ -110,8 +110,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 not a regular file' % args.inputFile)
|
||||
|
||||
Reference in New Issue
Block a user