Fix xap_client gen after render_xap_output changes

This commit is contained in:
zvecr
2023-03-06 19:56:38 +00:00
parent dc591c751d
commit 751e72c1f9
6 changed files with 41 additions and 28 deletions
+12 -10
View File
@@ -5,16 +5,18 @@ class XAPRouteError(Exception):
class XAPRoutes():
{%- for id, route in xap.routes | dictsort %}
{%- if route.routes %}
{% for id, route in xap.routes | dictsort %}
{% if route.routes %}
# {{route.define}}
{%- for subid, subroute in route.routes | dictsort %}
{% for subid, subroute in route.routes | dictsort %}
{{route.define}}_{{subroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}'
{%- if subroute.routes %}
{%- for subsubid, subsubroute in subroute.routes | dictsort %}
{% if subroute.routes %}
{% for subsubid, subsubroute in subroute.routes | dictsort %}
{{route.define}}_{{subroute.define}}_{{subsubroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}\x{{ '%02d' % subsubid|int(base=16) }}'
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
# noqa: W391