示例#1
0
 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)
示例#2
0
 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
示例#3
0
    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)