Fix SpoolBuddy daemon failing to import hardware drivers

The daemon imports read_tag and scale_diag as bare modules, but they
live in spoolbuddy/scripts/ which isn't on sys.path when systemd runs
the daemon. Added scripts/ to sys.path at startup, resolved relative
to the module file. Also moved the read_tag import inside NFCReader's
try/except (was crashing the daemon instead of skipping gracefully)
and demoted hardware-not-available messages from ERROR to INFO.
This commit is contained in:
maziggy
2026-02-27 13:31:51 +01:00
parent 8f3d194596
commit 541f8926b4
4 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class NFCReader:
self._ok = True
logger.info("NFC reader initialized")
except Exception as e:
logger.error("NFC init failed: %s", e)
logger.info("NFC not available: %s", e)
@property
def ok(self) -> bool: