MCPcopy Create free account
hub / github.com/celery/celery / wrap_handler

Method wrap_handler

celery/utils/log.py:204–214  ·  view source on GitHub ↗
(handler)

Source from the content-addressed store, hash-verified

202 # infinite loops.
203
204 def wrap_handler(handler): # pragma: no cover
205
206 class WithSafeHandleError(logging.Handler):
207
208 def handleError(self, record):
209 try:
210 traceback.print_exc(None, sys.__stderr__)
211 except OSError:
212 pass # see python issue 5971
213
214 handler.handleError = WithSafeHandleError().handleError
215 return [wrap_handler(h) for h in self.logger.handlers]
216
217 def write(self, data):

Callers

nothing calls this directly

Calls 1

WithSafeHandleErrorClass · 0.85

Tested by

no test coverage detected