[PATCH] Zeroconf breaks serve if there is no internet connection
Benoit Boissinot
bboissin at gmail.com
Thu Oct 30 05:14:17 CDT 2008
On Thu, Oct 30, 2008 at 1:55 AM, Augie Fackler <lists at durin42.com> wrote:
> The included patch fixes a bug I encountered in the zeroconf extension
> while on a plane. Adding this patch fixes zeroconf in situations when
> no internet connection is available, but allows it to work normally
> when there is one.
Shouldn't it try to bind on lo ?
>
> # HG changeset patch
> # User Augie Fackler <durin42 at gmail.com>
> # Date 1225324486 18000
> # Node ID 16735a436ca5486ca2734e5ef127cd13c72d039a
> # Parent 1493d1e05ca3034a104afca2f49aec2783be3df6
> zeroconf: Don't break serve if no internet connection is present.
>
> diff --git a/hgext/zeroconf/__init__.py b/hgext/zeroconf/__init__.py
> --- a/hgext/zeroconf/__init__.py
> +++ b/hgext/zeroconf/__init__.py
> @@ -46,7 +46,11 @@
> def publish(name, desc, path, port):
> global server, localip
> if not server:
> - server = Zeroconf.Zeroconf()
> + try:
> + server = Zeroconf.Zeroconf()
> + except socket.gaierror, e:
e is not use, please remote it
regards,
Benoit
More information about the Mercurial-devel
mailing list