##// END OF EJS Templates
made bool conversion more stable...
florianlink -
r190:96f042b3f3b1
parent child
Show More
@@ -742,8 +742,10 bool PythonQtConv::PyObjGetBool(PyObject* val, bool strict, bool &ok) {
742 d = true;
742 d = true;
743 ok = true;
743 ok = true;
744 } else if (!strict) {
744 } else if (!strict) {
745 d = PyObjGetInt(val, false, ok)!=0;
745 int result = PyObject_IsTrue(val);
746 ok = true;
746 d = (result == 1);
747 // the result is -1 if an error occurred, handle this:
748 ok = (result != -1);
747 }
749 }
748 return d;
750 return d;
749 }
751 }
General Comments 0
You need to be logged in to leave comments. Login now