fixed bug causing crash during token reading
This commit is contained in:
parent
1616d56288
commit
2576ad0dce
2
door.py
2
door.py
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user