mirror of https://github.com/jumpserver/jumpserver
[Bugfix] operation on closed file. (#2438)
parent
69f640daa4
commit
adf8b1f7aa
|
@ -143,7 +143,7 @@ class CeleryTaskFileHandler(CeleryTaskLoggerHandler):
|
||||||
|
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
msg = self.format(record)
|
msg = self.format(record)
|
||||||
if not self.f:
|
if not self.f or self.f.closed:
|
||||||
return
|
return
|
||||||
self.f.write(msg)
|
self.f.write(msg)
|
||||||
self.f.write(self.terminator)
|
self.f.write(self.terminator)
|
||||||
|
|
Loading…
Reference in New Issue