Skip to content
Snippets Groups Projects
Commit 3fc3f648 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-609: Fix Exception.message issue in resourcetool.py

parent 927dbaf0
No related branches found
No related tags found
No related merge requests found
...@@ -372,7 +372,7 @@ def parseArgs(args): ...@@ -372,7 +372,7 @@ def parseArgs(args):
try: try:
timestamps = parseTimestamps(datetime_fmt, (options.timestart, options.timestop)) timestamps = parseTimestamps(datetime_fmt, (options.timestart, options.timestop))
except ValueError as exc: except ValueError as exc:
parser.error("timestamp arguments: " + exc.message) parser.error("timestamp arguments: " + str(exc))
options.timestart = timestamps[0] options.timestart = timestamps[0]
options.timestop = timestamps[1] options.timestop = timestamps[1]
if options.timestart is not None and options.timestop is not None and options.timestart > options.timestop: if options.timestart is not None and options.timestop is not None and options.timestart > options.timestop:
...@@ -383,7 +383,7 @@ def parseArgs(args): ...@@ -383,7 +383,7 @@ def parseArgs(args):
try: try:
resource_updates.append(parseResourceArg(arg)) resource_updates.append(parseResourceArg(arg))
except ValueError as exc: except ValueError as exc:
parser.error("failed to parse non-option argument '{}': {}".format(i, exc.message)) parser.error("failed to parse non-option argument '{}': {}".format(i, exc))
return options, resource_updates, parser.print_help return options, resource_updates, parser.print_help
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment