Remove __del__ because the order of del is not guaranteed.

Sometimes the streamhandler is garbage collected before the
loghandler, in which case this makes a bad error.
master
voussoir 2021-09-23 22:34:02 -07:00
parent 6c0233c239
commit f10942fd3f
No known key found for this signature in database
GPG Key ID: 5F7554F8C26DACCB
1 changed files with 0 additions and 5 deletions

View File

@ -106,11 +106,6 @@ class LogHandler(vlogging.StreamHandler):
self.notify_every_line = notify_every_line
super().__init__(stream=self.log_buffer)
def __del__(self):
# Remember that del is not guaranteed to execute, but this should help
# out in cases where notify is never called.
self.notify()
def emit(self, record):
# The StreamHandler emit will write the line into the stringio buffer.
super().emit(record)