From 5f0799714d0e13ff89d0b7a366fbf5176c05ce12 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Thu, 31 May 2018 10:07:08 -0400 Subject: [PATCH] Cleanup Python 3 server startup code. Fixes #3277 --- runtime/Server.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/Server.cpp b/runtime/Server.cpp index 8dcaa85c5..3fc003956 100644 --- a/runtime/Server.cpp +++ b/runtime/Server.cpp @@ -321,9 +321,7 @@ void Server::run() wchar_t* n_argv[] = { wcAppName }; PySys_SetArgv(1, n_argv); - int fd = fileno(cp); - PyObject* PyFileObject = PyFile_FromFd(fd, m_appfile_utf8.data(), (char *)"r", -1, NULL, NULL,NULL,1); - if (PyRun_SimpleFile(fdopen(PyObject_AsFileDescriptor(PyFileObject),"r"), m_appfile_utf8.data()) != 0) + if (PyRun_SimpleFile(cp, m_appfile_utf8.data()) != 0) setError(tr("Failed to launch the application server, server thread exiting.")); #endif