mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Clear potential prior error state
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user