fix SortBySpec validator

(cherry picked from commit 05bf29f504)
This commit is contained in:
Thomas Waldmann 2023-04-12 01:21:43 +02:00 committed by Sasha Boginsky
parent 7707ea538c
commit de199c23ab

View file

@ -227,7 +227,7 @@ def SortBySpec(text):
from .manifest import AI_HUMAN_SORT_KEYS
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')