[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

View File

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