Limit pyexception code to Python >= 3.10

This commit is contained in:
Philippe Teuwen 2024-11-14 01:44:27 +01:00
commit 39c846ada4

View file

@ -532,6 +532,7 @@ static int CmdScriptRun(const char *Cmd) {
return PM3_SUCCESS;
}
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 10
pyexception:
PyConfig_Clear(&py_conf);
if (PyStatus_IsExit(status)) {
@ -541,6 +542,7 @@ pyexception:
PrintAndLogEx(WARNING, "\nPython initialization failed with exception: %s", status.err_msg);
}
return PM3_ESOFT;
#endif
}
#endif