Re: [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]

 



> 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):

Just saw this today - turns out we're hitting this problem on network
devices that simply don't have a MAC address, like serial USB modem
adapters and other funny hardware.

So, ACK and make sure you commit this to f12-branch as well.

- Chris

_______________________________________________
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