Fix additional UnboundLocalError for 'time' variable in WiFi scanning

- Removed second local import of 'time' module in scan_and_select_best_wifi method
- This was another instance of the same variable shadowing issue
- Both scan_wifi_networks and scan_and_select_best_wifi methods had local time imports
- Now both methods use the globally imported time module correctly
- WiFi scanning and network selection should work without any variable scoping errors

This completely resolves the UnboundLocalError issues in WiFi network scanning
by ensuring no local imports shadow the globally imported time module.
parent c4afd571
...@@ -1205,7 +1205,6 @@ class AutoInstallerGUI(QMainWindow): ...@@ -1205,7 +1205,6 @@ class AutoInstallerGUI(QMainWindow):
try: try:
# Enable interface for scanning # Enable interface for scanning
subprocess.run(['ip', 'link', 'set', self.selected_interface, 'up'], check=True) subprocess.run(['ip', 'link', 'set', self.selected_interface, 'up'], check=True)
import time
time.sleep(2) time.sleep(2)
# Scan networks # Scan networks
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment