summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-10-09 16:14:13 +0200
committerChris Lumens <clumens@redhat.com>2009-10-13 17:30:36 -0400
commit7155e1e66ad58afb78c078e100eaa6bdf4cfbab3 (patch)
tree0a4e1fee8bb58fdc0ad761538349afce9ce83027 /isys
parentc835d3ea15f1927551d61c904d1c75f8215593fa (diff)
downloadanaconda-7155e1e66ad58afb78c078e100eaa6bdf4cfbab3.tar.gz
anaconda-7155e1e66ad58afb78c078e100eaa6bdf4cfbab3.tar.xz
anaconda-7155e1e66ad58afb78c078e100eaa6bdf4cfbab3.zip
Do not traceback if network device doesn't have HwAddress property (#506013).
Diffstat (limited to 'isys')
-rwxr-xr-xisys/isys.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/isys/isys.py b/isys/isys.py
index ebc27a794..338ca2651 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):