Loading src/scripts/pycompare.py +8 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,13 @@ number_reg = re.compile(r'-?[0-9]\.[0-9]+E?[-+][0-9]{2,5}') # # \returns errors: `int` Number of detected error-level inconsistencies. def main(): config = {} try: config = parse_arguments() except ValueError as ex: print(ex) print("\nType \"pycompare.py --help\" to get more detailed help.") exit(1) errors, warnings, noisy = (0, 0, 0) if config['help_mode'] or len(argv) == 1: config['help_mode'] = True Loading Loading @@ -527,7 +533,7 @@ def parse_arguments(): elif (arg.startswith("--warn")): config['warning_threshold'] = float(split_arg[1]) else: raise Exception("Unrecognized argument \'{0:s}\'".format(arg)) raise ValueError("Unrecognized argument \'{0:s}\'".format(arg)) arg_index += 1 return config Loading Loading
src/scripts/pycompare.py +8 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,13 @@ number_reg = re.compile(r'-?[0-9]\.[0-9]+E?[-+][0-9]{2,5}') # # \returns errors: `int` Number of detected error-level inconsistencies. def main(): config = {} try: config = parse_arguments() except ValueError as ex: print(ex) print("\nType \"pycompare.py --help\" to get more detailed help.") exit(1) errors, warnings, noisy = (0, 0, 0) if config['help_mode'] or len(argv) == 1: config['help_mode'] = True Loading Loading @@ -527,7 +533,7 @@ def parse_arguments(): elif (arg.startswith("--warn")): config['warning_threshold'] = float(split_arg[1]) else: raise Exception("Unrecognized argument \'{0:s}\'".format(arg)) raise ValueError("Unrecognized argument \'{0:s}\'".format(arg)) arg_index += 1 return config Loading