From 60c6ffc224cca6bedfccfe2476d9e7294e6d7253 Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Sat, 1 May 2021 13:16:55 +0200 Subject: actions: Specify where a parse error happened for --around Previously quarg would simply echo the error message without any context, making it harder to find exactly which option caused it. --- quarg/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quarg/actions.py b/quarg/actions.py index 528d515..990327e 100644 --- a/quarg/actions.py +++ b/quarg/actions.py @@ -52,7 +52,7 @@ class ParseAround(argparse.Action): try: hour_range = int(rangespec) except ValueError as err: - errx(err) + errx(f'Error when parsing range for --around: {err}') else: datespec, hour_range = (aroundspec, 12) -- cgit v1.2.3-2-gb3c3