[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 2/4] Network spoke: fix unplugged info in device list



Don't report unplugged for plugged unmanaged (NM) devices.
---
 pyanaconda/ui/gui/spokes/network.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index daf4246..e2ec2e7 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -544,7 +544,8 @@ class NetworkControlBox():
 
     def _dev_title(self, device):
         unplugged = ''
-        if (device.get_device_type() == NetworkManager.DeviceType.ETHERNET
+        if (device.get_state() == NetworkManager.DeviceState.UNAVAILABLE
+            and device.get_device_type() == NetworkManager.DeviceType.ETHERNET
             and not device.get_carrier()):
             # Translators: ethernet cable is unplugged
             unplugged = ', <i>%s</i>' % _("unplugged")
-- 
1.7.7.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]