Facundo, is it correct that this code has no exception handler:
def _hook_inotify_to_twisted(self, wm, notifier): """This will hook inotify to twisted."""
class MyReader(abstract.FileDescriptor): """Chain between inotify and twisted.""" # will never pass a fd to write, pylint: disable-msg=W0223
def fileno(self): """Returns the fileno to select().""" # pylint: disable-msg=W0212 return wm._fd
def doRead(self): """Called when twisted says there's something to read.""" notifier.read_events() notifier.process_events()
reader = MyReader() reactor.addReader(reader) return reader
In case when process__events() fails, then all subsequent INotify events are not processed.
Facundo, is it correct that this code has no exception handler:
def _hook_inotify_ to_twisted( self, wm, notifier):
"""This will hook inotify to twisted."""
class MyReader( abstract. FileDescriptor) :
"""Chain between inotify and twisted."""
# will never pass a fd to write, pylint: disable-msg=W0223
def fileno(self):
"" "Returns the fileno to select()."""
# pylint: disable-msg=W0212
return wm._fd
def doRead(self):
"" "Called when twisted says there's something to read."""
notifier. read_events( )
notifier. process_ events( )
reader = MyReader() addReader( reader)
reactor.
return reader
In case when process__events() fails, then all subsequent INotify events are not processed.