Commit e1ab4f52 by rfkelly0

catch and report exceptions in watcher callbacks

parent 17c1950d
...@@ -172,7 +172,11 @@ class Watcher(object): ...@@ -172,7 +172,11 @@ class Watcher(object):
if event.path != self.path: if event.path != self.path:
if dirname(event.path) != self.path: if dirname(event.path) != self.path:
return return
self.callback(event) try:
self.callback(event)
except Exception:
print >>sys.stderr, "error in FS watcher callback", self.callback
traceback.print_exc()
class WatchableFSMixin(FS): class WatchableFSMixin(FS):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment