From c696b62c9b5558b592f930697415599f43ef2cb1 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Thu, 15 May 2014 17:53:18 +0200 Subject: [PATCH] [TASK] Check whether event was called before trying to cancel it. --- twisted/plugins/monitorbot_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twisted/plugins/monitorbot_plugin.py b/twisted/plugins/monitorbot_plugin.py index a13c33b..d7bc955 100644 --- a/twisted/plugins/monitorbot_plugin.py +++ b/twisted/plugins/monitorbot_plugin.py @@ -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)