Commit adf8b1f7 authored by jokimina's avatar jokimina Committed by 老广

[Bugfix] operation on closed file. (#2438)

parent 69f640da
......@@ -143,7 +143,7 @@ class CeleryTaskFileHandler(CeleryTaskLoggerHandler):
def emit(self, record):
msg = self.format(record)
if not self.f:
if not self.f or self.f.closed:
return
self.f.write(msg)
self.f.write(self.terminator)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment