mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix runtime compatibility with newer Python versions
Initial patch by Asser. Change restricted to Python 3.3 and above by me as PyUnicode_DecodeFSDefault was added in 3.3.
This commit is contained in:
committed by
Dave Page
parent
dd4705af60
commit
fc955537a8
@@ -126,8 +126,12 @@ Server::Server(quint16 port)
|
||||
{
|
||||
#ifdef PYTHON2
|
||||
PyList_Append(sysPath, PyString_FromString(path_list.at(i).toUtf8().data()));
|
||||
#else
|
||||
#if PY_MINOR_VERSION > 2
|
||||
PyList_Append(sysPath, PyUnicode_DecodeFSDefault(path_list.at(i).toUtf8().data()));
|
||||
#else
|
||||
PyList_Append(sysPath, PyBytes_FromString(path_list.at(i).toUtf8().data()));
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user