INNER CODE UNIT · Python

execute_command

weolar/miniblink49 · third_party/WebKit/Tools/RebaselineLogServer/main.py:92

def execute_command(command_data):
    if not command_data:
        return "ERROR: No command data"

    if "name" not in command_data:
        return "Command is missing a name: %s" % json.dumps(command_data)

    name = command_data["name"]
    command = COMMANDS.get(name)
    if not command:
        return "Command %s is unknown"
    try:
        return command.execute(command_data)
    except Exception as e:
        return "Exception caught when executing command '%s'" % name


class UpdateLog(webapp2.RequestHandler):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…