Lint: log instead of bare except-pass in two best-effort paths (ruff S110)

The album_tracks cache store (deezer_client) and the mutagen audio-length probe
(hifi_client) swallowed errors with try/except/pass. ruff S110 (selected by the
project) flagged them — they were the only 2 lint errors app-wide. Log at debug
instead. ruff check . now passes clean.
This commit is contained in:
BoulderBadgeDad 2026-06-21 22:47:11 -07:00
parent 458658de86
commit 2a7259b296
2 changed files with 4 additions and 4 deletions

View file

@ -148,8 +148,8 @@ def resolve_album_track_positions(session, base_url, album_ids, cache=None, slee
if cache and at_list is not None:
try:
cache.store_entity('deezer', 'album_tracks', aid, {'data': at_list})
except Exception: # noqa: BLE001
pass
except Exception as _cache_err: # noqa: BLE001
logger.debug("album_tracks cache store failed for %s: %s", aid, _cache_err)
except Exception: # noqa: BLE001 - never let metadata resolution break the fetch
at_list = None
for at in (at_list or []):

View file

@ -801,8 +801,8 @@ class HiFiClient(DownloadSourcePlugin):
info = getattr(mf, 'info', None) if mf is not None else None
if info is not None:
return float(getattr(info, 'length', 0) or 0)
except Exception:
pass
except Exception as _probe_err: # noqa: BLE001
logger.debug("mutagen audio-length probe failed for %s: %s", path, _probe_err)
return 0.0
@staticmethod