print line cleanup 3
This commit is contained in:
1 parent
f00ba3fefc
commit
55f30af700
2 files changed
+8
-10
No files matched your search
+2
-4
@@ -36,8 +36,7 @@ def save_state() -> None:
|
||||
try:
|
||||
with open(STATE_FILE, "wb") as f:
|
||||
pickle.dump(state, f, protocol=pickle.HIGHEST_PROTOCOL)
|
||||
if debug_output:
|
||||
print("[Scanner] State persisted to", STATE_FILE)
|
||||
print("[Scanner] State persisted to", STATE_FILE)
|
||||
except Exception as exc:
|
||||
# Don't crash the app – just log the error
|
||||
print("[Scanner] Warning: could not persist state:", exc)
|
||||
@@ -58,8 +57,7 @@ def load_state() -> None:
|
||||
_mac_cache.update(state.get("mac_cache", []))
|
||||
global _sensors_cache
|
||||
_sensors_cache = state.get("sensors", [])
|
||||
if debug_output:
|
||||
print("[Scanner] Loaded state from", STATE_FILE)
|
||||
print("[Scanner] Loaded state from", STATE_FILE)
|
||||
except Exception as exc:
|
||||
print("[Scanner] Warning: could not load state:", exc)
|
||||
|
||||
|
||||
Reference in new issue
Block a user