mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-22 03:49:18 +02:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user