Return the set of WiFi interface names visible in /sys/class/net/.
(self)
| 593 | if os.path.exists(state_file): |
| 594 | with open(state_file, 'r') as f: |
| 595 | state = json.load(f) |
| 596 | # Only use state if it's recent (less than 10 minutes old) |
| 597 | if time.time() - state.get('timestamp', 0) < 600: |
| 598 | return state |
| 599 | except Exception as e: |
| 600 | self.logger.warning(f"Could not load connection state: {e}") |
| 601 | return None |
| 602 | |
| 603 | def _cleanup_connection_state(self): |
| 604 | """Clean up connection state file""" |
| 605 | try: |
| 606 | state_file = '/tmp/ragnar_wifi_state.json' |
| 607 | if os.path.exists(state_file): |
| 608 | os.remove(state_file) |
no test coverage detected