py3: PyFindMethod -> GnericGetAttr

issue 0000995
This commit is contained in:
looooo
2017-06-02 11:56:38 +02:00
committed by wmayer
parent bc696e5ab5
commit f2e1b0df72
2 changed files with 18 additions and 4 deletions

View File

@@ -618,8 +618,13 @@ PyObject *Application::sSetLogLevel(PyObject * /*self*/, PyObject *args, PyObjec
return NULL;
PY_TRY{
int l;
#if PY_MAJOR_VERSION < 3
if (PyString_Check(pcObj)) {
const char *pstr = PyString_AsString(pcObj);
#else
if (PyUnicode_Check(pcObj)) {
const char *pstr = PyUnicode_AsUTF8(pcObj);
#endif
if(strcmp(pstr,"Log") == 0)
l = FC_LOGLEVEL_LOG;
else if(strcmp(pstr,"Warning") == 0)