commit cd9010af99bd78e049c7aa46d01a97f31f2a31ae
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Wed Aug 13 18:34:55 2014 +0200
XmlProcessing: don't transform None to string
If the XmlData dictionary contained a None value it would be transformed
to a string. This fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Controller/XmlProcessing.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Controller/XmlProcessing.py b/lnst/Controller/XmlProcessing.py
index 771ead5..40debae 100644
--- a/lnst/Controller/XmlProcessing.py
+++ b/lnst/Controller/XmlProcessing.py
@@ -140,7 +140,8 @@ class XmlData(dict):
def __getitem__(self, key):
value = super(XmlData, self).__getitem__(key)
- if type(value) == XmlData or type(value) == XmlCollection:
+ if type(value) == XmlData or type(value) == XmlCollection\
+ or value == None:
return value
return str(value)