Skip to content
Merged
Prev Previous commit
Next Next commit
Remove redundant check of pid_to_task result
  • Loading branch information
sergey-miryanov committed Feb 17, 2025
commit e9ac75bc5040b71da5bfb522ed6e0ece1dd101e7
3 changes: 0 additions & 3 deletions Modules/_testexternalinspection.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ search_map_for_section(pid_t pid, const char* secname, const char* substr) {

mach_port_t proc_ref = pid_to_task(pid);
if (proc_ref == 0) {
if (!PyErr_Occurred()) {
PyErr_SetString(PyExc_PermissionError, "Cannot get task for PID");
}
return 0;
}

Expand Down