BF: Add handling of exception in pyinotify callback

If error isn't handled, no error messages are printed and the jail
ceases to function.
pull/38/merge
Steven Hiscocks 2014-02-12 18:07:31 +00:00
parent fb557761e4
commit bda9b7d725
1 changed files with 4 additions and 1 deletions

View File

@ -209,4 +209,7 @@ class ProcessPyinotify(pyinotify.ProcessEvent):
# just need default, since using mask on watch to limit events # just need default, since using mask on watch to limit events
def process_default(self, event): def process_default(self, event):
self.__FileFilter.callback(event, origin='Default ') try:
self.__FileFilter.callback(event, origin='Default ')
except Exception as e:
logSys.error("Error in FilterPyinotify callback: %s", e)