Skip to content

Commit

Permalink
Limit pyexception code to Python >= 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Nov 14, 2024
1 parent 340e63e commit 39c846a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/cmdscript.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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

Expand Down

0 comments on commit 39c846a

Please sign in to comment.