refactor(errors): replace silent exception handling in core packages

This commit is contained in:
somew1nd committed 2026-09-01 15:54:49 -07:00
1 parent 584bb2d09c
commit 47e7cb6620
21 files changed
+132 -58

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ def spawn_daemon(
if log_handle is not subprocess.DEVNULL:
try:
log_handle.close()
except Exception:
except OSError:
pass
+4 -2
View File
@@ -152,7 +152,8 @@ class DevicePool:
if proc is not None:
try:
proc.kill()
except Exception:
except (ProcessLookupError, OSError):
# Process already exited; nothing left to clean up.
pass
return None
@@ -256,7 +257,8 @@ class DevicePool:
if proc is not None:
try:
proc.kill()
except Exception:
except (ProcessLookupError, OSError):
# Process already exited; nothing left to clean up.
pass
async def warm_up_async(
+3 -2
View File
@@ -113,8 +113,9 @@ class ProcessSupervisor:
logger.debug(f"Failed graceful stop for process {proc}: {e}")
try:
proc.kill()
except Exception:
pass
except (ProcessLookupError, OSError) as kill_exc:
# ProcessLookupError: already exited, nothing to do.
logger.debug(f"Failed to kill process {proc}: {kill_exc}")
process_supervisor: ProcessSupervisor = ProcessSupervisor()