Created
December 22, 2017 01:01
-
-
Save kantlivelong/feb5e4ed70b33205d4bb883cc1a20eac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#FROM: | |
def _reset_idle_timer(self): | |
if self._idleTimer: | |
self._idleTimer.reset() | |
else: | |
self._start_idle_timer() | |
#TO: | |
def _reset_idle_timer(self): | |
try: | |
if self._idleTimer.is_alive(): | |
self._idleTimer.reset() | |
else: | |
raise Exception() | |
except: | |
self._start_idle_timer() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment