From 35db1ac06d095b2086b06aa698e7d0db770ce6d9 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Sat, 16 May 2026 22:58:59 -0700 Subject: [PATCH] fix(lint): log S110 bare except-pass in amazon client and worker Three ruff S110 violations replaced with logger.debug calls: - amazon_client.py:527 duration backfill ASIN search - amazon_client.py:679 album metadata fetch in _fetch_album_metas - amazon_worker.py:401 artist image backfill from albums --- core/amazon_client.py | 8 ++++---- core/amazon_worker.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/amazon_client.py b/core/amazon_client.py index 143f0711..8d85e3cd 100644 --- a/core/amazon_client.py +++ b/core/amazon_client.py @@ -524,8 +524,8 @@ class AmazonClient: for item in search_items: if item.album_asin == asin and item.duration_seconds: duration_map[item.asin] = item.duration_seconds * 1000 - except Exception: - pass + except Exception as exc: + logger.debug("Duration backfill failed for ASIN %s: %s", asin, exc) items = [ { @@ -676,8 +676,8 @@ class AmazonClient: with _meta_cache_lock: _meta_cache[asin] = (time.monotonic(), meta) metas[asin] = meta - except Exception: - pass + except Exception as exc: + logger.debug("Album metadata fetch failed for ASIN %s: %s", asin, exc) from concurrent.futures import ThreadPoolExecutor with ThreadPoolExecutor(max_workers=min(len(asins), 5)) as pool: diff --git a/core/amazon_worker.py b/core/amazon_worker.py index 5103932f..59eaccb9 100644 --- a/core/amazon_worker.py +++ b/core/amazon_worker.py @@ -398,8 +398,8 @@ class AmazonWorker: if not image_url: try: image_url = self.client._get_artist_image_from_albums(result.id) - except Exception: - pass + except Exception as exc: + logger.debug("Artist image from albums failed for %s: %s", result.id, exc) if image_url: cursor.execute(""" UPDATE artists SET thumb_url = ?