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)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 17 Jun 2021 18:45:39 +0000 (19:45 +0100)
commitb6a8c4f72def4d1135ff42660a86276ce2565c8c
treeee2b0622d9239146d21192f5a691a88a5631b6ee
parent45710c02563602343261b690787bb1c76a676bef
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>
(cherry picked from commit 6d49fbdeab3e687a6818f809ca3d98ac7ced2c8d)
tools/golang/xenlight/gengotypes.py