diff options
-rw-r--r-- | online_duration.py | 6 | ||||
-rw-r--r-- | track_status.py | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/online_duration.py b/online_duration.py index 317b987..637b0ec 100644 --- a/online_duration.py +++ b/online_duration.py @@ -294,17 +294,17 @@ if __name__ == '__main__': try: return Grouping(s) except ValueError: - raise argparse.ArgumentTypeError() + raise argparse.ArgumentError() def database_format(s): try: return DatabaseFormat(s) except ValueError: - raise argparse.ArgumentTypeError() + raise argparse.ArgumentError() def output_format(s): try: return OutputFormat(s) except ValueError: - raise argparse.ArgumentTypeError() + raise argparse.ArgumentError() parser.add_argument('input', type=argparse.FileType('r'), help='database path') diff --git a/track_status.py b/track_status.py index fa6dbec..c593afe 100644 --- a/track_status.py +++ b/track_status.py @@ -12,14 +12,13 @@ if __name__ == '__main__': def natural_number(s): x = int(s) if x < 1: - raise argparse.ArgumentTypeError() + raise argparse.ArgumentError() return x - def output_format(s): try: return Format(s) except ValueError: - raise argparse.ArgumentTypeError() + raise argparse.ArgumentError() parser = argparse.ArgumentParser( description='Track when people go online/offline.') |