Re: [PATCH master] Honor selected hostname on Live CD (#638634)

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

 



On Fri, Oct 01, 2010 at 06:01:57PM +0200, Radek Vykydal wrote:
> NetworkManager on liveCD doesn't use ifcfg files, so we don't
> see any devices to be configured in anaconda (which is OK),
> but we still offer hostname choice, so honor it.
> ---
>  pyanaconda/network.py |   30 ++++++++++++++++++++----------
>  1 files changed, 20 insertions(+), 10 deletions(-)
> 
> diff --git a/pyanaconda/network.py b/pyanaconda/network.py
> index ae06f1e..d12d8ac 100644
> --- a/pyanaconda/network.py
> +++ b/pyanaconda/network.py
> @@ -446,6 +446,22 @@ class Network:
>          else:
>              self.netdevices[device].set(('GATEWAY', gw))
>  
> +    @property
> +    def gateway(self):
> +        """GATEWAY - last device in list wins"""
> +        gw = ""
> +        for dev in self.netdevices.values():
> +            gw = dev.get('GATEWAY')
> +        return gw

Is this a list? why not use self.netdevices.values()[-1]? After checking
to make sure len is > 0 of course.

-- 
Brian C. Lane / Anaconda Team
Port Orchard, WA (PST8PDT)

Attachment: pgpe6g1RswX1T.pgp
Description: PGP signature

_______________________________________________
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