def clean(self): try: close_all() finally: if self.sock: self.sock.close() if self.tcpinput: self.tcpinput.delete() if self.service: self.service.logout()
def exit(self): print 'quitting' close_all() if self.sock: self.sock.close() if self.tcpinput: self.tcpinput.delete() if self.service: self.service.logout() self.quit()
def stop_cmd(self): self.output('stopping') del self.loops[:] close_all() #print _tasks self.str_tasks.set("Active Tasks: %d" % len(_tasks))