Skip to content

Commit 39c846a

Browse files
committed
Limit pyexception code to Python >= 3.10
1 parent 340e63e commit 39c846a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client/src/cmdscript.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ static int CmdScriptRun(const char *Cmd) {
532532
return PM3_SUCCESS;
533533
}
534534

535+
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 10
535536
pyexception:
536537
PyConfig_Clear(&py_conf);
537538
if (PyStatus_IsExit(status)) {
@@ -541,6 +542,7 @@ static int CmdScriptRun(const char *Cmd) {
541542
PrintAndLogEx(WARNING, "\nPython initialization failed with exception: %s", status.err_msg);
542543
}
543544
return PM3_ESOFT;
545+
#endif
544546
}
545547
#endif
546548

0 commit comments

Comments
 (0)