commit 0e5f00ea372a5c37d449997e1f77906e4bcddc93
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Thu May 3 11:18:32 2012 +0200
NetTestParse.py: Conversion of attributes
DOM parser returns unicode strings, but LNST works with
traditional strings. It's necessary to convert unicode strings
for consistency.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
NetTest/NetTestParse.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/NetTest/NetTestParse.py b/NetTest/NetTestParse.py
index 10ff4fc..c1493b5 100644
--- a/NetTest/NetTestParse.py
+++ b/NetTest/NetTestParse.py
@@ -251,10 +251,10 @@ class NetTestParse:
num_attributes = node.attributes.length
while(i < num_attributes):
attr = node.attributes.item(i)
- attr.value = self._expand_string(attr.value, recipe_eval)
+ attr.value = self._expand_string(str(attr.value), recipe_eval)
i += 1
elif node.nodeType == node.TEXT_NODE:
- node.data = self._expand_string(node.data, recipe_eval)
+ node.data = self._expand_string(str(node.data), recipe_eval)
for child in node.childNodes:
self._expand(child, recipe_eval)
Show replies by date