Yes!
Proposed patch (needs tests):
=== modified file 'ubuntuone/platform/linux/filesystem_notifications.py' --- ubuntuone/platform/linux/filesystem_notifications.py 2011-10-18 13:51:26 +0000 +++ ubuntuone/platform/linux/filesystem_notifications.py 2011-12-19 11:23:11 +0000 @@ -405,6 +405,7 @@
def _hook_inotify_to_twisted(self, wm, notifier): """This will hook inotify to twisted.""" + _logger = self.log
class MyReader(abstract.FileDescriptor): """Chain between inotify and twisted.""" @@ -418,7 +419,10 @@ def doRead(self): """Called when twisted says there's something to read.""" notifier.read_events() - notifier.process_events() + try: + notifier.process_events() + except Exception, e: + _logger.exception("Error while processing events: %r", e)
reader = MyReader() reactor.addReader(reader)
Yes!
Proposed patch (needs tests):
=== modified file 'ubuntuone/ platform/ linux/filesyste m_notifications .py' platform/ linux/filesyste m_notifications .py 2011-10-18 13:51:26 +0000 platform/ linux/filesyste m_notifications .py 2011-12-19 11:23:11 +0000
--- ubuntuone/
+++ ubuntuone/
@@ -405,6 +405,7 @@
def _hook_inotify_ to_twisted( self, wm, notifier):
"""This will hook inotify to twisted."""
+ _logger = self.log
class MyReader( abstract. FileDescriptor) :
" ""Chain between inotify and twisted."""
"""Called when twisted says there's something to read."""
notifier. read_events( ) process_ events( ) process_ events( ) exception( "Error while processing events: %r", e)
@@ -418,7 +419,10 @@
def doRead(self):
- notifier.
+ try:
+ notifier.
+ except Exception, e:
+ _logger.
reader = MyReader()
reactor. addReader( reader)