From f820a99c7cb4d678f3a904489d82bcb2efc0bc74 Mon Sep 17 00:00:00 2001 From: nessi Date: Sun, 16 Aug 2026 20:09:53 +0200 Subject: [PATCH] refactor: reorder smartctl command fallback chain to prioritize -d sat mode before standard commands Move -d sat variants of -A and -x commands to front of fallback chain before non-sat equivalents in smart_temperature() function to improve compatibility with SATA drives behind USB/RAID controllers --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 06fc876..a4e9e11 100644 --- a/app.py +++ b/app.py @@ -371,10 +371,10 @@ def smart_temperature(device): return None for command in ( - ["smartctl", "-A", smart_device], ["smartctl", "-A", "-d", "sat", smart_device], - ["smartctl", "-x", smart_device], ["smartctl", "-x", "-d", "sat", smart_device], + ["smartctl", "-A", smart_device], + ["smartctl", "-x", smart_device], ): output, _ = _read_command(command, timeout=6, warn_on_nonzero=False) temperature = extract(output)