Commit 6ab15d03 authored by olivier R-D's avatar olivier R-D

python2 fix

parent e364c8ae
......@@ -255,7 +255,7 @@ class XmlImporter(object):
ltext = ua.LocalizedText()
for name, val in obj.value[0][1]:
if name == "Text":
ltext.Text = bytes(val, "utf-8")
ltext.Text = val.encode("utf-8")
else:
self.logger.warning("While parsing localizedText value, unkown element: %s with val: %s", name, val)
return ua.Variant(ltext, ua.VariantType.LocalizedText)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment