From 63d78fbaafa7d247347f9052db86f575d89260b7 Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Wed, 24 Jun 2015 20:28:46 +0200 Subject: Fix config to struct/dict translation for array options --- python/astra/utils.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') 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) -- cgit v1.2.3