(self, environ, start_response)
return response(environ, start_response)
Dispatch the requests.
Dispatch the requests.
Dispatch the requests .
def __call__(self, environ, start_response):
        """Dispatch the requests."""
        # important: don't ever access a function here that reads the incoming
        # form data!  Otherwise the application won't have access to that data
        # any more!
        request = Request(environ)
        response = self.debug_application
        if request.args.get("__debugger__") == "yes":
            cmd = request.args.get("cmd")
            arg = request.args.get("f")
            secret = request.args.get("s")
            traceback = self.tracebacks.get(request.args.get("tb", type=int))
            frame = self.frames.get(request.args.get("frm", type=int))
            if cmd == "resource" and arg:
                response = self.get_resource(request, arg)
            elif cmd == "paste" and traceback is not None and secret == self.secret:
                response = self.paste_traceback(request, traceback)
            elif cmd == "pinauth" and secret == self.secret:
                response = self.pin_auth(request)
            elif cmd == "printpin" and secret == self.secret:
                response = self.log_pin_request()
            elif (
                self.evalex
                and cmd is not None
                and frame is not None
                and self.secret == secret
                and self.check_pin_trust(environ)
            ):
                response = self.execute_command(request, cmd, frame)
        elif (
            self.evalex
            and self.console_path is not None
            and request.path == self.console_path
        ):
            response = self.display_console(request)
        return response(environ, start_response)
def __call__ ( self , environ , start_response ) : # important: don't ever access a function here that reads the incoming # form data!  Otherwise the application won't have access to that data # any more! request = Request ( environ ) response = self . debug_application if request . args . get ( "__debugger__" ) == "yes" : cmd = request . args . get ( "cmd" ) arg = request . args . get ( "f" ) secret = request . args . get ( "s" ) traceback = self . tracebacks . get ( request . args . get ( "tb" , type = int ) ) frame = self . frames . get ( request . args . get ( "frm" , type = int ) ) if cmd == "resource" and arg : response = self . get_resource ( request , arg ) elif cmd == "paste" and traceback is not None and secret == self . secret : response = self . paste_traceback ( request , traceback ) elif cmd == "pinauth" and secret == self . secret : response = self . pin_auth ( request ) elif cmd == "printpin" and secret == self . secret : response = self . log_pin_request ( ) elif ( self . evalex and cmd is not None and frame is not None and self . secret == secret and self . check_pin_trust ( environ ) ) : response = self . execute_command ( request , cmd , frame ) elif ( self . evalex and self . console_path is not None and request . path == self . console_path ) : response = self . display_console ( request ) return response ( environ , start_response )