Example #1
0
 def __del__(self, _is_shutting_down=_is_shutting_down):
     if not _is_shutting_down():
         if self.close is not None:
             self.close()
Example #2
0
 def __del__(self, _is_shutting_down=_is_shutting_down):
     # Avoid errors trying to rely on globals and modules at interpreter
     # shutdown.
     if not _is_shutting_down():
         if self.close is not None:
             self.close()