1
0

routes.py.j2 363 B

1234567891011121314
  1. class XAPRouteError(Exception):
  2. pass
  3. class XAPRoutes():
  4. {%- for id, route in xap.routes | dictsort %}
  5. {%- if route.routes %}
  6. # {{route.define}}
  7. {%- for subid, subroute in route.routes | dictsort %}
  8. {{route.define}}_{{subroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}'
  9. {%- endfor %}
  10. {%- endif %}
  11. {%- endfor %}