summaryrefslogtreecommitdiffstats
path: root/python/astra
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-06-24 20:28:46 +0200
committerDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-06-24 20:28:46 +0200
commit63d78fbaafa7d247347f9052db86f575d89260b7 (patch)
treeeb097d65aa41e61d2c34541c5d8ff819cc95ab02 /python/astra
parent8ad46dc9cb28067047838e06770707cf86ef6e56 (diff)
downloadastra-63d78fbaafa7d247347f9052db86f575d89260b7.tar.gz
astra-63d78fbaafa7d247347f9052db86f575d89260b7.tar.bz2
astra-63d78fbaafa7d247347f9052db86f575d89260b7.tar.xz
astra-63d78fbaafa7d247347f9052db86f575d89260b7.zip
Fix config to struct/dict translation for array options
Diffstat (limited to 'python/astra')
-rw-r--r--python/astra/utils.pyx5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/astra/utils.pyx b/python/astra/utils.pyx
index a8e9e4e..260c308 100644
--- a/python/astra/utils.pyx
+++ b/python/astra/utils.pyx
@@ -204,7 +204,10 @@ cdef XMLNode2dict(XMLNode node):
while it != nodes.end():
subnode = deref(it)
if castString(subnode.getName())=="Option":
- opts[castString(subnode.getAttribute('key'))] = stringToPythonValue(subnode.getAttribute('value'))
+ if subnode.hasAttribute('value'):
+ opts[castString(subnode.getAttribute('key'))] = stringToPythonValue(subnode.getAttribute('value'))
+ else:
+ opts[castString(subnode.getAttribute('key'))] = stringToPythonValue(subnode.getContent())
else:
dct[castString(subnode.getName())] = stringToPythonValue(subnode.getContent())
inc(it)