Fix bare except clauses to catch only Exception types
Replace bare 'except:' with 'except Exception:' in three locations: - check_process_survival (line ~1632): when accessing pe.szExeFile - get_process_name (line ~1782): when getting process name from snapshot - pipe_server_thread (line ~2340): when terminating malicious processes Bare except clauses also catch SystemExit and KeyboardInterrupt, which can prevent proper shutdown and mask serious issues. Using 'except Exception:' allows the code to properly handle expected errors while letting system-exiting events propagate.
This commit is contained in:
1 parent
65b1ac78f3
commit
415abef4fc
1 file changed
+2353
-2357