[PATCH rhel7-branch] network: adapt to NM fixing virtual device disconnection (#1084953)
Radek Vykydal
rvykydal at redhat.com
Mon Apr 7 12:01:03 UTC 2014
NM fixed handling of disconnected virtual devices in bug #1078720
so the device-removed event is emited correctly and the device is
in DISCONNECTED state now. We need to handle this state.
Resolves: rhbz#1084953
---
pyanaconda/ui/gui/spokes/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index d5e85a7..665cfcf 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -100,7 +100,7 @@ def localized_string_of_device_state(device, state):
else:
str = _("Unavailable")
elif state == NetworkManager.DeviceState.DISCONNECTED:
- if (device.get_device_type() == NetworkManager.DeviceType.ETHERNET
+ if (device and device.get_device_type() == NetworkManager.DeviceType.ETHERNET
and not device.get_carrier()):
str = _("Cable unplugged")
else:
--
1.7.11.7
More information about the anaconda-patches
mailing list