review-fix(suppress-audit): backup/mcp_oauth/wake_word/run_notifications — restore BASE exception semantics

This commit is contained in:
Teknium
2026-09-03 09:50:40 -07:00
parent 81984a7ebd
commit 2dbfd3b4aa
4 changed files with 42 additions and 21 deletions
+8 -3
View File
@@ -497,8 +497,10 @@ class WakeWordDetector:
try:
self._audio_q.put_nowait(chunk)
except Exception:
with suppress(Exception): # full: drop the oldest frame, then retry once
# Drop oldest on overflow so we stay real-time
with suppress(Exception):
self._audio_q.get_nowait()
with suppress(Exception):
self._audio_q.put_nowait(chunk)
def start(self) -> None:
@@ -703,9 +705,12 @@ def _acquire_machine_lock(path: Optional[Path] = None):
def _release_machine_lock(handle) -> None:
if handle is None:
return
with suppress(OSError):
try:
_flock(handle, False)
handle.close()
except OSError:
pass
finally:
handle.close()
def _teardown_locked(close: Callable[[], None]) -> None: