comparison src/core/log.py @ 1016:0c361fdc76af

core (logs): workaround for pyjamas bug
author Goffi <goffi@goffi.org>
date Thu, 08 May 2014 17:16:15 +0200
parents 11409a6c16c7
children 0ea97f483464
comparison
equal deleted inserted replaced
1015:fee00f2e11c2 1016:0c361fdc76af
89 'levelname': level, 89 'levelname': level,
90 } 90 }
91 try: 91 try:
92 if not self.filter_name.dictFilter(record): 92 if not self.filter_name.dictFilter(record):
93 raise Filtered 93 raise Filtered
94 except AttributeError: 94 except (AttributeError, TypeError): # XXX: TypeError is here because of a pyjamas bug which need to be fixed (TypeError is raised instead of AttributeError)
95 if self.filter_name is not None: 95 if self.filter_name is not None:
96 raise ValueError("Bad filter: filters must have a .filter method") 96 raise ValueError("Bad filter: filters must have a .filter method")
97 try: 97 try:
98 return self.fmt % record 98 return self.fmt % record
99 except TypeError: 99 except TypeError: