[Kimchi-devel] [PATCH 2/3] xml parser: pep8 clean for xmlutils.py

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Thu Jan 9 10:32:54 UTC 2014


From: Royce Lv <lvroyce at linux.vnet.ibm.com>

Clean pep8 and add xmlutils.py to clean list.

Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
 Makefile.am            | 1 +
 src/kimchi/xmlutils.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 04ad696..f39c8a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -56,6 +56,7 @@ PEP8_WHITELIST = \
 	src/kimchi/rollbackcontext.py \
 	src/kimchi/root.py \
 	src/kimchi/server.py \
+	src/kimchi/xmlutils.py \
 	tests/test_mockmodel.py \
 	tests/test_model.py \
 	tests/test_plugin.py \
diff --git a/src/kimchi/xmlutils.py b/src/kimchi/xmlutils.py
index f94db30..4686113 100644
--- a/src/kimchi/xmlutils.py
+++ b/src/kimchi/xmlutils.py
@@ -33,7 +33,7 @@ from kimchi.exception import ParseError
 def xpath_get_text(xml, expr):
     doc = libxml2.parseDoc(xml)
     res = doc.xpathEval(expr)
-    ret = [None if x.children == None else x.children.content for x in res]
+    ret = [None if x.children is None else x.children.content for x in res]
 
     doc.freeDoc()
     return ret
-- 
1.8.1.2




More information about the Kimchi-devel mailing list