Skip to content

Commit 26ea8bc

Browse files
committed
fix(main): check if a session timer was creating before cancelling it
Signed-off-by: Cedric Hombourger <[email protected]>
1 parent 9cdb2b1 commit 26ea8bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: mtda/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def __init__(self):
7171
self._pastebin_api_key = None
7272
self._pastebin_endpoint = None
7373
self._session_manager = None
74+
self._session_timer = None
7475
self._storage_locked = False
7576
self._storage_mounted = False
7677
self._storage_opened = False
@@ -1646,7 +1647,8 @@ def stop(self):
16461647
return True
16471648

16481649
# stop sesssion timer
1649-
self._session_timer.cancel()
1650+
if self._session_timer:
1651+
self._session_timer.cancel()
16501652

16511653
# stop web service
16521654
if self._www is not None:

0 commit comments

Comments
 (0)