mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Corrections
This commit is contained in:
@@ -178,12 +178,14 @@ PythonInit::PythonInit()
|
||||
}
|
||||
|
||||
// Error handling function to replace goto exception
|
||||
#if (PY_VERSION_HEX >= 0x03080000)
|
||||
void PythonInit::handlePythonError(PyStatus status, PyConfig& config)
|
||||
{
|
||||
Error(Logger::getInstance("DAEMON"), "Initializing Python config failed with error [%s]", status.err_msg);
|
||||
PyConfig_Clear(&config);
|
||||
throw std::runtime_error("Initializing Python failed!");
|
||||
}
|
||||
#endif
|
||||
|
||||
PythonInit::~PythonInit()
|
||||
{
|
||||
@@ -196,4 +198,5 @@ PythonInit::~PythonInit()
|
||||
#endif
|
||||
|
||||
int rc = Py_FinalizeEx();
|
||||
Debug(Logger::getInstance("DAEMON"), "Cleaning up Python interpreter %s", rc == 0 ? "succeeded" : "failed");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user