Make network optional
As we don’t have a network object in WSL and inherit from the base class, ensure it can be None.
This commit is contained in:
parent
84774c5dc4
commit
73e1ab7901
|
@ -119,8 +119,9 @@ class MetaController:
|
||||||
|
|
||||||
async def ssh_info_GET(self) -> Optional[LiveSessionSSHInfo]:
|
async def ssh_info_GET(self) -> Optional[LiveSessionSSHInfo]:
|
||||||
ips = []
|
ips = []
|
||||||
for dev in self.app.base_model.network.get_all_netdevs():
|
if self.app.base_model.network:
|
||||||
ips.extend(map(str, dev.actual_global_ip_addresses))
|
for dev in self.app.base_model.network.get_all_netdevs():
|
||||||
|
ips.extend(map(str, dev.actual_global_ip_addresses))
|
||||||
if not ips:
|
if not ips:
|
||||||
return None
|
return None
|
||||||
username = self.app.installer_user_name
|
username = self.app.installer_user_name
|
||||||
|
|
Loading…
Reference in New Issue