

def route_request(self, handle, connection, command, headers, data):
    found = False
    for route in self.routes:
        match = route[0].match(command)
        if match:
            if data:
                data = json.loads(data)
            _log.debug(('Calvin control handles:%s\n%s\n---------------' % (command, data)))
            route[1](handle, connection, match, data, headers)
            found = True
            break
    if (not found):
        _log.error(('No route found for: %s\n%s' % (command, data)))
        match.send_response(handle, connection, None, status=404)

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvincontrol.py CalvinControl.route_request/VarMisuse@127/167 `self`->`match`