fixed bug causing crash during token reading

This commit is contained in:
Simon Pirkelmann 2021-04-10 18:21:59 +02:00
parent 1616d56288
commit 2576ad0dce

View File

@ -85,6 +85,8 @@ def read_valid_tokens():
try: try:
if len(valid_thru.strip()) > 0: if len(valid_thru.strip()) > 0:
valid_thru = datetime.date.fromisoformat(valid_thru) valid_thru = datetime.date.fromisoformat(valid_thru)
else:
valid_thru = None
except Exception: except Exception:
log(f"Could not parse valid thru date for token {token} in line {i}") log(f"Could not parse valid thru date for token {token} in line {i}")
valid_thru = None valid_thru = None