Bug when starting without existing state.yml and not locking
Yokto13 opened this issue · comments
Dominik Farhan commented
Bug Description:
When I run Stopro without existing state.yml file and then stop it without locking in between, crash occurs.
Crash occurs because dateutil parser cannot parse 'locked_since' being 0.
Steps to Reproduce:
- delete state.yml
- start Stopro
- stop Stopro
The failing line is:
src/lock.py", line 28, in is_unlock_allowed
can_be_open_after = parser.parse(state["lock"]["locked_since"]) + timedelta(seconds=state["lock"]["locked_for"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I'll try to fix this and submit a PR.