Compare commits

...

1 Commits

Author SHA1 Message Date
1b7412c80d Fix UnboundLocalError when no enclosures present 2026-03-07 23:02:34 +00:00

View File

@@ -43,6 +43,8 @@ async def get_overview(response: Response):
warnings = 0
errors = 0
all_healthy = True
all_cache_hits = True
any_lookups = False
for enc_idx, enc in enumerate(enclosures_raw):
slots_raw = list_slots(enc["id"])
@@ -53,8 +55,6 @@ async def get_overview(response: Response):
smart_results = await asyncio.gather(*smart_tasks, return_exceptions=True)
smart_map: dict[str, dict] = {}
all_cache_hits = True
any_lookups = False
for (slot_info, dev), result in zip(populated, smart_results):
if isinstance(result, Exception):
logger.warning("SMART query failed for %s: %s", dev, result)