summaryrefslogtreecommitdiff
path: root/python3/pyinotify.py
diff options
context:
space:
mode:
Diffstat (limited to 'python3/pyinotify.py')
-rwxr-xr-xpython3/pyinotify.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python3/pyinotify.py b/python3/pyinotify.py
index 467a521..a2eda17 100755
--- a/python3/pyinotify.py
+++ b/python3/pyinotify.py
@@ -1922,6 +1922,9 @@ class WatchManager:
continue
raise WatchManagerError(err, ret_)
+ # Remove watch from our dictionary
+ if awd in self._wmd:
+ del self._wmd[awd]
ret_[awd] = True
log.debug('Watch WD=%d (%s) removed', awd, self.get_path(awd))
return ret_