From 39c846ada4832a874a1744bc45851b385857f6cb Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 14 Nov 2024 01:44:27 +0100 Subject: [PATCH] Limit pyexception code to Python >= 3.10 --- client/src/cmdscript.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/cmdscript.c b/client/src/cmdscript.c index d25063b336..cc1d4000a1 100644 --- a/client/src/cmdscript.c +++ b/client/src/cmdscript.c @@ -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 @@ static int CmdScriptRun(const char *Cmd) { PrintAndLogEx(WARNING, "\nPython initialization failed with exception: %s", status.err_msg); } return PM3_ESOFT; +#endif } #endif