diff options
author | Sebastien Martini <seb@dbzteam.org> | 2011-10-11 10:21:00 -0700 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2011-10-11 10:21:00 -0700 |
commit | b8064287ddc14979a7b1b936f6159d956b25da60 (patch) | |
tree | 9d52e09d7e0f4361525519c884be868ae5ceddd3 | |
parent | 8184a1806220b305c386e15fae67e6ab2ce3dba3 (diff) | |
download | pyinotify-b8064287ddc14979a7b1b936f6159d956b25da60.tar.gz |
Ignore dangling IN_IGNORED events sent after watches are removed.
-rwxr-xr-x | python2/pyinotify.py | 5 | ||||
-rwxr-xr-x | python3/pyinotify.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index f4e3ae4..8954802 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -1321,8 +1321,9 @@ class Notifier: # Not really sure how we ended up here, nor how we should # handle these types of events and if it is appropriate to # completly skip them (like we are doing here). - log.warning("Unable to retrieve Watch object associated to %s", - repr(raw_event)) + if not (raw_event.mask & IN_IGNORED): + log.warning("Unable to retrieve Watch object associated to %s", + repr(raw_event)) continue revent = self._sys_proc_fun(raw_event) # system processings if watch_ and watch_.proc_fun: diff --git a/python3/pyinotify.py b/python3/pyinotify.py index 4d005ed..05b2846 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -1267,8 +1267,9 @@ class Notifier: # Not really sure how we ended up here, nor how we should # handle these types of events and if it is appropriate to # completly skip them (like we are doing here). - log.warning("Unable to retrieve Watch object associated to %s", - repr(raw_event)) + if not (raw_event.mask & IN_IGNORED): + log.warning("Unable to retrieve Watch object associated to %s", + repr(raw_event)) continue revent = self._sys_proc_fun(raw_event) # system processings if watch_ and watch_.proc_fun: |