From bda9b7d7252f3e968f741251640eaacb33d64a3c Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Wed, 12 Feb 2014 18:07:31 +0000 Subject: [PATCH] BF: Add handling of exception in pyinotify callback If error isn't handled, no error messages are printed and the jail ceases to function. --- server/filterpyinotify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/filterpyinotify.py b/server/filterpyinotify.py index 9ecb999d..530b712d 100644 --- a/server/filterpyinotify.py +++ b/server/filterpyinotify.py @@ -209,4 +209,7 @@ class ProcessPyinotify(pyinotify.ProcessEvent): # just need default, since using mask on watch to limit events 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)