[virt-tools-list] [PATCH 01/12] xmlbuilder: add a __repr__ for XMLBuilder object
marcandre.lureau at redhat.com
marcandre.lureau at redhat.com
Tue Feb 21 13:00:51 UTC 2017
From: Marc-André Lureau <marcandre.lureau at redhat.com>
To help with debugging.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
virtinst/xmlbuilder.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py
index 5183b323..7b041683 100644
--- a/virtinst/xmlbuilder.py
+++ b/virtinst/xmlbuilder.py
@@ -1168,3 +1168,6 @@ class XMLBuilder(object):
elif key in childprops:
for obj in util.listify(getattr(self, key)):
obj._add_parse_bits(node)
+
+ def __repr__(self):
+ return "<XMLBuilder %s %s>" % (self._XML_ROOT_NAME, id(self))
--
2.11.0.295.gd7dffce1c.dirty
More information about the virt-tools-list
mailing list