[BASE] Removed dead code (#10330)

This commit is contained in:
mosfet80
2023-08-28 17:41:20 +02:00
committed by GitHub
parent 4adbc90c99
commit cb607ffe1e
14 changed files with 9 additions and 175 deletions

View File

@@ -61,17 +61,8 @@ PyException::PyException()
setPyObject(PP_PyDict_Object);
std::string prefix = PP_last_error_type; /* exception name text */
// prefix += ": ";
std::string error = PP_last_error_info; /* exception data text */
#if 0
// The Python exceptions might be thrown from nested functions, so take
// into account not to add the same prefix several times
std::string::size_type pos = error.find(prefix);
if (pos == std::string::npos)
_sErrMsg = prefix + error;
else
_sErrMsg = error;
#endif
_sErrMsg = error;
_errorType = prefix;
@@ -248,7 +239,6 @@ std::string InterpreterSingleton::runString(const char *sCmd)
else {
PyException::ThrowException();
return {}; // just to quieten code analyzers
//throw PyException();
}
}
@@ -417,9 +407,6 @@ void InterpreterSingleton::runFile(const char*pxFileName, bool local)
#endif
if (fp) {
PyGILStateLocker locker;
//std::string encoding = PyUnicode_GetDefaultEncoding();
//PyUnicode_SetDefaultEncoding("utf-8");
//PyUnicode_SetDefaultEncoding(encoding.c_str());
PyObject *module{}, *dict{};
module = PyImport_AddModule("__main__");
dict = PyModule_GetDict(module);