[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Reset resolver before looking up IP address.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Subject: Re: [PATCH] Reset resolver before looking up IP address.
- Date: Wed, 21 Jan 2009 11:07:46 -0500
> diff --git a/network.py b/network.py
> index 0d0e2b0..9661fda 100644
> --- a/network.py
> +++ b/network.py
> @@ -1,7 +1,7 @@
> #
> # network.py - network configuration install data
> #
> -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
> +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -440,6 +440,9 @@ class Network:
> log.warning("no network devices were available to look up host name")
> return None
>
> + # reset the resolver in case things have changed.
> + isys.resetResolv()
> +
> try:
> (family, socktype, proto, canonname, sockaddr) = \
> socket.getaddrinfo(self.hostname, None, socket.AF_INET)[0]
As far as hacks go, this looks fine to me. Oh if only we didn't have to
do this everywhere.
- Chris
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]