File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,3 @@ def _get_scan_results(self, iface: str) -> list[WifiNetwork]:
275275 except SysCallError as err :
276276 debug ('Unable to retrieve wifi results' )
277277 raise err
278-
279-
280- wifi_handler = WifiHandler ()
Original file line number Diff line number Diff line change 1010from archinstall .lib .args import arch_config_handler
1111from archinstall .lib .disk .utils import disk_layouts
1212from archinstall .lib .general import running_from_host
13- from archinstall .lib .network .wifi_handler import wifi_handler
13+ from archinstall .lib .network .wifi_handler import WifiHandler
1414from archinstall .lib .networking import ping
1515from archinstall .lib .packages .packages import check_version_upgrade
1616
@@ -32,12 +32,12 @@ def _log_sys_info() -> None:
3232 debug (f'Disk states before installing:\n { disk_layouts ()} ' )
3333
3434
35- def _check_online () -> bool :
35+ def _check_online (wifi_handler : WifiHandler | None = None ) -> bool :
3636 try :
3737 ping ('1.1.1.1' )
3838 except OSError as ex :
3939 if 'Network is unreachable' in str (ex ):
40- if not arch_config_handler . args . skip_wifi_check :
40+ if wifi_handler :
4141 success = not wifi_handler .setup ()
4242 if not success :
4343 return False
@@ -79,7 +79,12 @@ def run() -> int:
7979 _log_sys_info ()
8080
8181 if not arch_config_handler .args .offline :
82- if not _check_online ():
82+ if not arch_config_handler .args .skip_wifi_check :
83+ wifi_handler = WifiHandler ()
84+ else :
85+ wifi_handler = None
86+
87+ if not _check_online (wifi_handler ):
8388 return 0
8489
8590 if not _fetch_arch_db ():
You can’t perform that action at this time.
0 commit comments