def dispatch_return(self, frame, arg): if frame.f_back is None: self.console.writeline('*** Thread finished ***\n') if not self.console.closed: self.console.flush() self.console.close() return Pdb.dispatch_return(self, frame, arg)
def dispatch_return(self, frame, arg): # The parent's method needs to be called first. ret = Pdb.dispatch_return(self, frame, arg) if frame.f_back is None: self.console.writeline('*** Thread finished ***\n') if not self.console.closed: self.console.flush() self.console.close() return ret
def dispatch_return(self, frame, arg): """ Close the web-console if returning from the top-most frame (the addon script itself) This is needed because Kodi does not respect daemon threads. """ if frame.f_back is None: self.console.writeline('*** Addon finished ***') if not self.console.closed: self.console.flush() self.console.close() return Pdb.dispatch_return(self, frame, arg)