xmlbuilder: add a __repr__ for XMLBuilder object

To help with debugging.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2017-02-21 17:00:51 +04:00 committed by Cole Robinson
parent 0055798d21
commit 1f0d1d3f7d
1 changed files with 3 additions and 0 deletions

View File

@ -1168,3 +1168,6 @@ class XMLBuilder(object):
elif key in childprops: elif key in childprops:
for obj in util.listify(getattr(self, key)): for obj in util.listify(getattr(self, key)):
obj._add_parse_bits(node) obj._add_parse_bits(node)
def __repr__(self):
return "<XMLBuilder %s %s>" % (self._XML_ROOT_NAME, id(self))