

def build_url(self, values=None):
    if (values and (len(self.variables) > len(values))):
        raise RouterException(('Need %d argument to build the URL. Got %d' % (len(self.variables), len(values))))
    url_parts = []
    for (_is_dynamic, var) in self._trace:
        if _is_dynamic:
            try:
                url_parts.append(str(values[var]))
            except KeyError:
                raise RouterException(("Need argument '%s' to build the URL." % var))
        else:
            url_parts.append(var)
    return str(''.join(var))

dataset/ETHPy150Open jasonlvhit/lunar/lunar/router.py Rule.build_url/VarMisuse@136/197 `url_parts`->`var`