mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-04 06:15:09 +00:00
fix(display): narrow the WiFi status before reading expires_at (#715)
Narrow the WiFi status before reading expires_at (mypy Optional index; behaviour unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2522,8 +2522,10 @@ class DisplayController:
|
||||
if self.on_demand_active:
|
||||
return False
|
||||
status = self._check_wifi_status_message()
|
||||
if not status:
|
||||
return False
|
||||
# The 1 s throttle can hand back a result that has expired since.
|
||||
return bool(status) and time.time() < status['expires_at']
|
||||
return time.time() < float(status['expires_at'])
|
||||
|
||||
def _resolve_active_mode(self):
|
||||
"""The mode this pass shows: the on-demand session's current mode
|
||||
|
||||
Reference in New Issue
Block a user