From f10942fd3fcf298a94248019f024af9e17f322f7 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 23 Sep 2021 22:34:02 -0700 Subject: [PATCH] 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. --- voussoirkit/operatornotify.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/voussoirkit/operatornotify.py b/voussoirkit/operatornotify.py index 9ccc882..3a5722b 100644 --- a/voussoirkit/operatornotify.py +++ b/voussoirkit/operatornotify.py @@ -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)