def destroy(self): if not self.setup_done: return signal.setitimer(signal.ITIMER_REAL, 0) signal.signal(signal.SIGALRM, self.prev_signal_handler)