Merge pull request #555 from RobinD42/fix-issue547

Fix for wxpg. SetPropertyAttribute
This commit is contained in:
Robin Dunn
2017-09-23 22:33:02 -05:00
committed by GitHub

View File

@@ -32,6 +32,7 @@ static wxString i_Py2wxString(PyObject* source)
#if wxUSE_UNICODE_WCHAR == 0
#error wxString converison can only handle WCHAR wxStrings currently
#endif
PyErr_Clear();
PyObject* uni = source;
if (PyBytes_Check(source)) {
// if it's a string object convert it to unicode first, assumes utf-8
@@ -283,6 +284,8 @@ wxVariant i_wxVariant_in_helper(PyObject* obj)
{
wxVariant value;
PyErr_Clear();
if (PyBytes_Check(obj) || PyUnicode_Check(obj))
value = Py2wxString(obj);