[TASK] Check whether event was called before trying to cancel it.

This commit is contained in:
Jan Philipp Timme 2014-05-15 17:53:18 +02:00
parent bee6f3a127
commit c696b62c9b
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class MonitorBotService(Service):
return s
def fsnotify(ignored, filepath, mask):
if self._callid != None:
if self._callid != None and self._callid.active():
self._callid.cancel()
path_segments = filepath.segmentsFrom(self._watch_path)
new_path = '/'.join(path_segments)