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]

 



On Fri, 2009-10-09 at 16:14 +0200, Radek Vykydal wrote:
> ---
>  isys/isys.py |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)

Seems pretty messed up for a NIC to have no MAC address. I suppose this
is only okay for these WWAN cards. Should we still traceback if the
device is a conventional NIC since they need a MAC address to function
correctly, or just assume it's a dbus problem and carry on?

Dave

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

_______________________________________________
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