From: "Brian C. Lane" <bcl(a)redhat.com>
In some cases self.con can be None, check for this and don't crash.
---
pyanaconda/ui/gui/spokes/network.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 3a92084..e38cef8 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -217,14 +217,16 @@ def __init__(self, device=None, con=None):
def get_device_type(self):
if self.device:
return self.device.get_device_type()
- else:
+ elif self.con:
return self.setting_types.get(self.con.get_connection_type(), None)
+ else:
+ return None
def get_iface(self):
iface = None
if self.device:
iface = self.device.get_iface()
- else:
+ elif self.con:
iface = self.con.get_setting_connection().get_interface_name()
if not iface:
mac = self.con.get_setting_wired().get_mac_address()
--
To view this commit on github, visit
https://github.com/rhinstaller/anaconda/commit/eec538956bd3b11fc14712db9e...