gh-134064: Fix sys.remote_exec() error checking (#134067)

This commit is contained in:
Victor Stinner
2025-05-17 18:24:40 -04:00
committed by GitHub
parent fc7f4c3666
commit 009e7b3698
2 changed files with 8 additions and 1 deletions

View File

@@ -2485,7 +2485,7 @@ sys_remote_exec_impl(PyObject *module, int pid, PyObject *script)
PyObject *path;
const char *debugger_script_path;
if (PyUnicode_FSConverter(script, &path) < 0) {
if (PyUnicode_FSConverter(script, &path) == 0) {
return NULL;
}
debugger_script_path = PyBytes_AS_STRING(path);