From 21ca3669982bb2d0782cced75454ebb990505a31 Mon Sep 17 00:00:00 2001 From: dasman Date: Mon, 11 Nov 2024 03:42:06 +0300 Subject: [PATCH] tau: wrong due date exit with error instead assert --- bin/tau/tau-python/tau | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/tau/tau-python/tau b/bin/tau/tau-python/tau index 64ce3c19b..fc4a61822 100755 --- a/bin/tau/tau-python/tau +++ b/bin/tau/tau-python/tau @@ -145,7 +145,9 @@ def convert_attr_val(attr, val): sys.exit(-1) elif attr == "due": # Other date formats not yet supported... ez to add - assert len(val) == 4 + if len(val) != 4: + print(f"Error: due date must be of length 4 in mmyy format") + sys.exit(-1) date = datetime.now().date() year = int(date.strftime("%Y"))%100 try: