Saggi Mizrahi has posted comments on this change.
Change subject: libvirtvm: Cast text to string when creating text node ......................................................................
Patch Set 3: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/utils.py Line 595: return '%d' % (val) Line 596: else: Line 597: return val Line 598: Line 599: def convertToUnicode (val): comparing types should be done with isinstance()
But in any case, isn't that just what unicode() does?
In [1]: unicode(2) Out[1]: u'2'
In [2]: unicode(2.0) Out[2]: u'2.0'
In [3]: unicode("11") Out[3]: u'11'
In [4]: unicode(u"11") Out[4]: u'11' Line 600: varType = type(val) Line 601: if varType in (float, long, int): Line 602: return unicode(str(val)) Line 603: elif varType is str:
-- To view, visit http://gerrit.ovirt.org/7832 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id22db83062eaf85645c2d61c83f3f20943918413 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Daniel P. Berrange berrange@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com