(ssid: Optional[str], bssid: Optional[str])
| 2127 | |
| 2128 | def _ni_load_memory(): |
| 2129 | """Load the persisted alert memory once per process.""" |
| 2130 | global _ni_memory_loaded |
| 2131 | if _ni_memory_loaded: |
| 2132 | return |
| 2133 | _ni_memory_loaded = True |
| 2134 | try: |
| 2135 | with open(_ni_store_path()) as f: |
| 2136 | data = json.load(f) |
| 2137 | for k, v in (data.items() if isinstance(data, dict) else ()): |
| 2138 | if isinstance(v, dict) and 'rank' in v: |
| 2139 | _ni_alert_memory[k] = { |
| 2140 | 'rank': int(v.get('rank', 1)), |
| 2141 | 'ts': float(v.get('ts', 0) or 0), |
| 2142 | 'clean_since': (float(v['clean_since']) |
no outgoing calls
no test coverage detected