print line cleanup 3
This commit is contained in:
1 parent
f00ba3fefc
commit
55f30af700
2 files changed
+1
-3
No files matched your search
@@ -43,7 +43,7 @@ async def read_data(mac_address):
|
|||||||
success = False
|
success = False
|
||||||
# Check if Mi service is available
|
# Check if Mi service is available
|
||||||
|
|
||||||
print("?? Waiting on client to connect...")
|
print("-- Waiting on client to connect...")
|
||||||
while not client.is_connected:
|
while not client.is_connected:
|
||||||
await asyncio.sleep(0.1)
|
await asyncio.sleep(0.1)
|
||||||
while not success:
|
while not success:
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ def save_state() -> None:
|
|||||||
try:
|
try:
|
||||||
with open(STATE_FILE, "wb") as f:
|
with open(STATE_FILE, "wb") as f:
|
||||||
pickle.dump(state, f, protocol=pickle.HIGHEST_PROTOCOL)
|
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:
|
except Exception as exc:
|
||||||
# Don't crash the app – just log the error
|
# Don't crash the app – just log the error
|
||||||
@@ -58,7 +57,6 @@ def load_state() -> None:
|
|||||||
_mac_cache.update(state.get("mac_cache", []))
|
_mac_cache.update(state.get("mac_cache", []))
|
||||||
global _sensors_cache
|
global _sensors_cache
|
||||||
_sensors_cache = state.get("sensors", [])
|
_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:
|
except Exception as exc:
|
||||||
print("[Scanner] Warning: could not load state:", exc)
|
print("[Scanner] Warning: could not load state:", exc)
|
||||||
|
|||||||
Reference in new issue
Block a user