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

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



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: pgpNtavQaIf6H.pgp
Description: PGP signature


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