MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _cache_interface_networks

Method _cache_interface_networks

wifi_manager.py:203–211  ·  view source on GitHub ↗

Cache scan results per interface while preserving legacy attributes.

(self, interface, networks)

Source from the content-addressed store, hash-verified

201 is 2.4 GHz only.
202
203 The payoff is that the AP never has to come down: hostapd keeps the
204 built-in radio while the dongle joins, scans and roams independently.
205 On a single-radio box this returns the same interface as the AP, and
206 behaviour is unchanged.
207 """
208 # Cached briefly: this is consulted on every connection check, and the
209 # underlying lookup shells out to nmcli.
210 now = time.time()
211 if self._client_iface_cache and (now - self._client_iface_cache_ts) < 10.0:
212 return self._client_iface_cache
213 iface = self._find_secondary_wifi_interface() or self.default_wifi_interface
214 self._client_iface_cache = iface

Callers 2

scan_networksMethod · 0.95

Calls 1

Tested by

no test coverage detected