[PATCH] Do not traceback if network device doesn't have HwAddress property (#506013).

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

 



---
 isys/isys.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/isys/isys.py b/isys/isys.py
index ebc27a7..338ca26 100755
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -516,8 +516,13 @@ def getMacAddress(dev):
     if device_props_iface is None:
         return None
 
-    device_macaddr = device_props_iface.Get(NM_MANAGER_IFACE, "HwAddress")
-    return device_macaddr.upper()
+    device_macaddr = None
+    try:
+        device_macaddr = device_props_iface.Get(NM_MANAGER_IFACE, "HwAddress").upper()
+    except dbus.exceptions.DBusException as e:
+        if e.get_dbus_name() != 'org.freedesktop.DBus.Error.InvalidArgs':
+            raise
+    return device_macaddr
 
 # Get a description string for a network device (e.g., eth0)
 def getNetDevDesc(dev):
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux