gui/backend/gui_plugin/core/RequestHandler.py
def run(self):
        """
        Thread function to setup the shell callbacks for print and prompt
        functions.
        """
        self._prompt_event = Event()

        shell = mysqlsh.globals.shell

        self._shell_ctx = shell.create_context({"printDelegate": lambda x: self.on_shell_print(x),
                                                "diagDelegate": lambda x: self.on_shell_print_diag(x),
                                                "errorDelegate": lambda x: self.on_shell_print_error(x),
                                                "promptDelegate": lambda x: self.on_shell_prompt(x),
                                                "passwordDelegate": lambda x: self.on_shell_password(x), })
        self._shell = self._shell_ctx.get_shell()

        result = None
        try:
            result = self._func(**self._kwargs)
        except Exception as e:
            result = Response.exception(e)

        if result is not None:
            self._web_handler.send_command_response(self._request_id, result)
        else:
            # This is the case of any plugin function that does not fail but
            # does not return anything, we should return an OK response anyway
            # to confirm it completed
            self._web_handler.send_command_response(
                self._request_id, Response.ok("Completed"))

        self._shell_ctx.finalize()

        Thread function to setup the shell callbacks for print and prompt
        functions.
        
Thread function to setup the shell callbacks for print and prompt
functions.
Thread function to setup the shell callbacks for print and prompt functions .
def run(self):
        self._prompt_event = Event()
        shell = mysqlsh.globals.shell
        self._shell_ctx = shell.create_context({"printDelegate": lambda x: self.on_shell_print(x),
                                                "diagDelegate": lambda x: self.on_shell_print_diag(x),
                                                "errorDelegate": lambda x: self.on_shell_print_error(x),
                                                "promptDelegate": lambda x: self.on_shell_prompt(x),
                                                "passwordDelegate": lambda x: self.on_shell_password(x), })
        self._shell = self._shell_ctx.get_shell()
        result = None
        try:
            result = self._func(**self._kwargs)
        except Exception as e:
            result = Response.exception(e)
        if result is not None:
            self._web_handler.send_command_response(self._request_id, result)
        else:
            self._web_handler.send_command_response(
                self._request_id, Response.ok("Completed"))
        self._shell_ctx.finalize()
def run ( self ) : self . _prompt_event = Event ( ) shell = mysqlsh . globals . shell self . _shell_ctx = shell . create_context ( { "printDelegate" : lambda x : self . on_shell_print ( x ) , "diagDelegate" : lambda x : self . on_shell_print_diag ( x ) , "errorDelegate" : lambda x : self . on_shell_print_error ( x ) , "promptDelegate" : lambda x : self . on_shell_prompt ( x ) , "passwordDelegate" : lambda x : self . on_shell_password ( x ) , } ) self . _shell = self . _shell_ctx . get_shell ( ) result = None try : result = self . _func ( ** self . _kwargs ) except Exception as e : result = Response . exception ( e ) if result is not None : self . _web_handler . send_command_response ( self . _request_id , result ) else : self . _web_handler . send_command_response ( self . _request_id , Response . ok ( "Completed" ) ) self . _shell_ctx . finalize ( )
Thread function to setup the shell callbacks for print and prompt
functions.
Thread function to setup the shell callbacks for print and prompt functions .
"""
        Thread function to setup the shell callbacks for print and prompt
        functions.
        """ # This is the case of any plugin function that does not fail but # does not return anything, we should return an OK response anyway # to confirm it completed
self