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

Method _get_wifi_interfaces_sysfs

wifi_manager.py:595–605  ·  view source on GitHub ↗

Return the set of WiFi interface names visible in /sys/class/net/.

(self)

Source from the content-addressed store, hash-verified

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)

Callers 1

Calls 2

addMethod · 0.80
setFunction · 0.50

Tested by

no test coverage detected