golang/xenlight: fix code generation for python 2.6
authorNick Rosbrook <rosbrookn@gmail.com>
Mon, 20 Jul 2020 23:54:40 +0000 (19:54 -0400)
committerWei Liu <wl@xen.org>
Tue, 21 Jul 2020 12:31:45 +0000 (12:31 +0000)
commit6d49fbdeab3e687a6818f809ca3d98ac7ced2c8d
tree4d181c4a2c98165ddfc95e8490934e2ddad60e4c
parentaf0584931c1b902577317dacff976bc4b4f3923d
golang/xenlight: fix code generation for python 2.6

Before python 2.7, str.format() calls required that the format fields
were explicitly enumerated, e.g.:

  '{0} {1}'.format(foo, bar)

  vs.

  '{} {}'.format(foo, bar)

Currently, gengotypes.py uses the latter pattern everywhere, which means
the Go bindings do not build on python 2.6. Use the 2.6 syntax for
format() in order to support python 2.6 for now.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: Wei Liu <wl@xen.org>
tools/golang/xenlight/gengotypes.py