diff options
| author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-06-24 20:43:05 +0200 | 
|---|---|---|
| committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-07-23 11:57:15 +0200 | 
| commit | 4c9e432ae4581fdc110e9a9c45267227be1c7c31 (patch) | |
| tree | 6b488b83037b31f8abfab55b1d87805ed8a7dc21 | |
| parent | 11af4b554df9a8a5c31d9dcbc1ea849b32394ba3 (diff) | |
Fix config to dict translation for array options
| -rw-r--r-- | src/PluginAlgorithm.cpp | 7 | 
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{ | 
