From 05bf29f5041078d4e5d7e83e9223ec9ccdb2823d Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 12 Apr 2023 01:21:43 +0200 Subject: [PATCH] fix SortBySpec validator --- src/borg/helpers/parseformat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/borg/helpers/parseformat.py b/src/borg/helpers/parseformat.py index 911df979e..ade24241a 100644 --- a/src/borg/helpers/parseformat.py +++ b/src/borg/helpers/parseformat.py @@ -285,7 +285,7 @@ def SortBySpec(text): for token in text.split(","): if token not in AI_HUMAN_SORT_KEYS: - raise ValueError("Invalid sort key: %s" % token) + raise argparse.ArgumentTypeError("Invalid sort key: %s" % token) return text.replace("timestamp", "ts")