mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +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:
@@ -27,7 +27,7 @@ class ScaleReader:
|
||||
self._ok = True
|
||||
logger.info("Scale initialized (tare=%d, cal=%.6f)", tare_offset, calibration_factor)
|
||||
except Exception as e:
|
||||
logger.error("Scale init failed: %s", e)
|
||||
logger.info("Scale not available: %s", e)
|
||||
|
||||
@property
|
||||
def ok(self) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user