diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-13 16:44:04 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-13 16:44:04 +0300 |
commit | 53c43fe54660090113a5b55b71b50ff84f68e335 (patch) | |
tree | 20742f909a180fd0464ceb12732f5821fa9733b2 /gsxws | |
parent | 00ea5a0283378d9c0c43832a66faa023188668f4 (diff) | |
download | py-gsxws-53c43fe54660090113a5b55b71b50ff84f68e335.tar.gz py-gsxws-53c43fe54660090113a5b55b71b50ff84f68e335.tar.bz2 py-gsxws-53c43fe54660090113a5b55b71b50ff84f68e335.zip |
Fixing nesting in GsxObject to_xml
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/core.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index 52d09c3..69149d2 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -335,10 +335,12 @@ class GsxObject(object): el.append(v.to_xml(k)) if isinstance(v, list): for e in v: - if isinstance(v, GsxObject): + if isinstance(e, GsxObject): el.append(e.to_xml(k)) - else: # assuming it's a dict... - el.append(GsxObject(**e).to_xml(k)) + else: # assuming it's a dict... @TODO: make this nicer + for a, b in e.items(): + i = ET.SubElement(el, a) + i.text = b return root |