summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel M. Pelt <D.M.Pelt@cwi.nl>2015-06-24 20:43:05 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-07-23 11:57:15 +0200
commit4c9e432ae4581fdc110e9a9c45267227be1c7c31 (patch)
tree6b488b83037b31f8abfab55b1d87805ed8a7dc21 /src
parent11af4b554df9a8a5c31d9dcbc1ea849b32394ba3 (diff)
downloadastra-4c9e432ae4581fdc110e9a9c45267227be1c7c31.tar.gz
astra-4c9e432ae4581fdc110e9a9c45267227be1c7c31.tar.bz2
astra-4c9e432ae4581fdc110e9a9c45267227be1c7c31.tar.xz
astra-4c9e432ae4581fdc110e9a9c45267227be1c7c31.zip
Fix config to dict translation for array options
Diffstat (limited to 'src')
-rw-r--r--src/PluginAlgorithm.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/PluginAlgorithm.cpp b/src/PluginAlgorithm.cpp
index df13f31..a27ce2c 100644
--- a/src/PluginAlgorithm.cpp
+++ b/src/PluginAlgorithm.cpp
@@ -275,7 +275,12 @@ PyObject* XMLNode2dict(XMLNode node){
while(it!=nodes.end()){
XMLNode subnode = *it;
if(subnode.getName()=="Option"){
- PyObject *obj = stringToPythonValue(subnode.getAttribute("value"));
+ PyObject *obj;
+ if(subnode.hasAttribute("value")){
+ obj = stringToPythonValue(subnode.getAttribute("value"));
+ }else{
+ obj = stringToPythonValue(subnode.getContent());
+ }
PyDict_SetItemString(opts, subnode.getAttribute("key").c_str(), obj);
Py_DECREF(obj);
}else{