git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7352683
)
fix typeerror when calling xml.parse_dict
author
smbaker
<smbaker@fc8clean.lan>
Mon, 5 Dec 2011 05:00:56 +0000
(21:00 -0800)
committer
smbaker
<smbaker@fc8clean.lan>
Mon, 5 Dec 2011 05:00:56 +0000
(21:00 -0800)
sfa/util/xml.py
patch
|
blob
|
history
diff --git
a/sfa/util/xml.py
b/sfa/util/xml.py
index
1a7f2f3
..
90693f2
100755
(executable)
--- a/
sfa/util/xml.py
+++ b/
sfa/util/xml.py
@@
-195,7
+195,7
@@
class XML:
self.namespaces['default'] = 'default'
self.root = XmlElement(root, self.namespaces)
self.namespaces['default'] = 'default'
self.root = XmlElement(root, self.namespaces)
- # set schema
+ # set schema
for key in self.root.attrib.keys():
if key.endswith('schemaLocation'):
# schema location should be at the end of the list
for key in self.root.attrib.keys():
if key.endswith('schemaLocation'):
# schema location should be at the end of the list
@@
-208,7
+208,7
@@
class XML:
if element is None:
if self.root is None:
self.parse_xml('<%s/>' % root_tag_name)
if element is None:
if self.root is None:
self.parse_xml('<%s/>' % root_tag_name)
- element = self.root
+ element = self.root
.element
if 'text' in d:
text = d.pop('text')
if 'text' in d:
text = d.pop('text')
@@
-224,9
+224,9
@@
class XML:
self.parse_dict(val, key, child_element)
elif isinstance(val, basestring):
child_element = etree.SubElement(element, key).text = val
self.parse_dict(val, key, child_element)
elif isinstance(val, basestring):
child_element = etree.SubElement(element, key).text = val
-
+
elif isinstance(value, int):
elif isinstance(value, int):
- d[key] = unicode(d[key])
+ d[key] = unicode(d[key])
elif value is None:
d.pop(key)
elif value is None:
d.pop(key)