Skip to content

Commit 83678fc

Browse files
author
wonder
committedNov 18, 2008

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/python/qgspythonutilsimpl.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,15 @@ QString QgsPythonUtilsImpl::getPluginMetadata( QString pluginName, QString funct
434434
PyErr_Clear();
435435
retval = "__error__";
436436
}
437+
else if ( PyUnicode_Check( obj ) )
438+
{
439+
PyObject* utf8 = PyUnicode_AsUTF8String( obj );
440+
if (utf8)
441+
retval = QString::fromUtf8( PyString_AS_STRING( utf8 ) );
442+
else
443+
retval = "__error__";
444+
Py_XDECREF( utf8 );
445+
}
437446
else if ( PyString_Check( obj ) )
438447
{
439448
retval = PyString_AS_STRING( obj );

0 commit comments

Comments
 (0)
Please sign in to comment.