From f22f0bb4b615928fcdcacad9409c902d69cf3132 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 11 Jul 2013 10:07:11 +0200 Subject: [PATCH] Make log.firewall display the callback name in any case. --- src/log.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/log.py b/src/log.py index ffa0acd19..b8c335dc8 100644 --- a/src/log.py +++ b/src/log.py @@ -346,9 +346,10 @@ def firewall(f, errorHandler=None): if s is None: s = 'Uncaught exception' if hasattr(self, 'log'): - self.log.exception('%s:', s) + logging_function = self.log.exception else: - exception('%s in %s.%s:', s, self.__class__.__name__, f.func_name) + logging_function = exception + logging_function('%s in %s.%s:', s, self.__class__.__name__, f.func_name) def m(self, *args, **kwargs): try: return f(self, *args, **kwargs)