Преглед на файлове

tau: wrong due date exit with error instead assert

dasman преди 1 година
родител
ревизия
21ca366998
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      bin/tau/tau-python/tau

+ 3 - 1
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: