

def __call__(self, environ, start_response):
    'Dispatch the requests.'
    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.is_trusted(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)

dataset/ETHPy150Open GoogleCloudPlatform/appengine-flask-skeleton/lib/werkzeug/debug/__init__.py DebuggedApplication.__call__/original