From 5ba030d12f80ab372d74987f409b9438e356861d Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 23 Apr 2017 15:02:48 +0200 Subject: [PATCH] Extend Py interface of PropertyStringList to accept all sequence types --- src/App/PropertyStandard.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 31920dbafa..a1827a2ff5 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -1604,13 +1604,16 @@ PyObject *PropertyStringList::getPyObject(void) void PropertyStringList::setPyObject(PyObject *value) { - if (PyList_Check(value)) { - Py_ssize_t nSize = PyList_Size(value); + if (PyString_Check(value)) { + setValue(PyString_AsString(value)); + } + else if (PySequence_Check(value)) { + Py_ssize_t nSize = PySequence_Size(value); std::vector values; values.resize(nSize); for (Py_ssize_t i=0; iob_type->tp_name;