Make log.firewall display the callback name in any case.

This commit is contained in:
Valentin Lorentz 2013-07-11 10:07:11 +02:00
parent 4647ed81fd
commit f22f0bb4b6
1 changed files with 3 additions and 2 deletions

View File

@ -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)