def __del__(self, is_finalizing=is_finalizing): if is_finalizing() or not self._log_traceback: # set_exception() was not called, or result() or exception() # has consumed the exception return tb = traceback.format_exception(*self._exc_info) app_log.error('Future %r exception was never retrieved: %s', self, ''.join(tb).rstrip())
def test_basic(self): self.assertFalse(is_finalizing())
def __del__(self, is_finalizing=is_finalizing): if not is_finalizing() and self.formatted_tb: app_log.error('Future exception was never retrieved: %s', ''.join(self.formatted_tb).rstrip())