mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-21 16:27:39 -06:00
Fix stupid thinko
This commit is contained in:
parent
df667bff53
commit
8a56eb9cd0
@ -210,12 +210,12 @@ Server::Server(quint16 port, QString key, QString logFileName)
|
||||
|
||||
// Redirect stderr
|
||||
PyObject *sys = PyImport_ImportModule("sys");
|
||||
#if PY_MINOR_VERSION > 2
|
||||
#ifdef PYTHON2
|
||||
PyObject *err = PyFile_FromString(m_logFileName.toUtf8().data(), (char *)"w");
|
||||
#else
|
||||
FILE *log = fopen(m_logFileName.toUtf8().data(), (char *)"w");
|
||||
int fd = fileno(log);
|
||||
PyObject *err = PyFile_FromFd(fd, NULL, (char *)"w", -1, NULL, NULL, NULL, 0);
|
||||
#else
|
||||
PyObject *err = PyFile_FromString(m_logFileName.toUtf8().data(), (char *)"w");
|
||||
#endif
|
||||
PyObject_SetAttrString(sys, "stderr", err);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user