def interrupt(self): try: if self.interruptable: if hasattr(thread, 'interrupt_main'): #Jython doesn't have it thread.interrupt_main() else: self.mainThread._thread.interrupt() #Jython return True except: traceback.print_exc() return False
def interrupt(self): self.buffer = None # Also clear the buffer when it's interrupted. try: if self.interruptable: if hasattr(thread, "interrupt_main"): # Jython doesn't have it thread.interrupt_main() else: self.mainThread._thread.interrupt() # Jython return True except: traceback.print_exc() return False
def interrupt(self): self.buffer = None # Also clear the buffer when it's interrupted. try: if self.interruptable: if hasattr(thread, 'interrupt_main'): #Jython doesn't have it thread.interrupt_main() else: self.mainThread._thread.interrupt() #Jython return True except: traceback.print_exc() return False