Issue #1 new

IN_Q_OVERFLOW not handled

Ben Higgins
created an issue

A KeyError exception occurs on an IN_Q_OVERFLOW event since wd in this case is -1.

Traceback from running simple.py with a patched watcher.py that prints out the event when wd == -1:

'/tmp/vte07R0LW' IN_MODIFY
'/tmp/vteNXR0LW' IN_MODIFY
'/tmp/vte07R0LW' IN_MODIFY
event(wd=-1, mask=IN_Q_OVERFLOW)
Traceback (most recent call last):
  File "simple.py", line 30, in <module>
    for evt in w.read():
  File "/home/ben/dump/python-inotify/build/lib.linux-x86_64-2.7/inotify/watcher.py", line 296, in read
    events = super(AutoWatcher, self).read(bufsize)
  File "/home/ben/dump/python-inotify/build/lib.linux-x86_64-2.7/inotify/watcher.py", line 183, in read
    events.append(Event(evt, self._wds[evt.wd][0]))
KeyError: -1