mirror of
https://github.com/slgobinath/SafeEyes.git
synced 2024-12-25 23:52:42 +01:00
Fix the error NoneType added with timedelta
This commit is contained in:
parent
c06375a62f
commit
0953abe855
@ -160,8 +160,13 @@ def __start_idle_monitor():
|
||||
enable_safe_eyes()
|
||||
elif idle_seconds < break_interval:
|
||||
# Credit back the idle time
|
||||
next_break = next_break_time + idle_period
|
||||
enable_safe_eyes(next_break.timestamp())
|
||||
if next_break is not None:
|
||||
# This method runs in a thread since the start.
|
||||
# It may run before next_break is initialized in the update_next_break method
|
||||
next_break = next_break_time + idle_period
|
||||
enable_safe_eyes(next_break.timestamp())
|
||||
else:
|
||||
enable_safe_eyes()
|
||||
else:
|
||||
# User is idle for more than the time between two breaks
|
||||
enable_safe_eyes()
|
||||
|
Loading…
Reference in New Issue
Block a user