diff --git a/data/templates/xap/client/python/routes.py.j2 b/data/templates/xap/client/python/routes.py.j2 index 7497e8afa1d..7eb6a5bde2e 100644 --- a/data/templates/xap/client/python/routes.py.j2 +++ b/data/templates/xap/client/python/routes.py.j2 @@ -1,4 +1,8 @@ +class XAPRouteError(Exception): + pass + + class XAPRoutes(): {%- for id, route in xap.routes | dictsort %} {%- if route.routes %} diff --git a/data/templates/xap/client/python/types.py.j2 b/data/templates/xap/client/python/types.py.j2 index be9b386e143..b6202fa2777 100644 --- a/data/templates/xap/client/python/types.py.j2 +++ b/data/templates/xap/client/python/types.py.j2 @@ -1,8 +1,34 @@ +from collections import namedtuple from enum import IntFlag, IntEnum +from struct import Struct -class XAPRouteError(Exception): - pass +class XAPRequest(namedtuple('XAPRequest', 'token length data')): + fmt = Struct('