mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 23:27:56 -05:00
tau: wrong due date exit with error instead assert
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user