Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb.py @ 896:01215ad04283
Merge with BOS
author | mpm@selenic.com |
---|---|
date | Sat, 13 Aug 2005 19:43:42 -0800 |
parents | c333dfa8fa1a 77b52b864249 |
children | e4f1b76831b2 f15901d053e1 |
line wrap: on
line diff
--- a/mercurial/hgweb.py Sat Aug 13 12:41:00 2005 -0800 +++ b/mercurial/hgweb.py Sat Aug 13 19:43:42 2005 -0800 @@ -708,7 +708,12 @@ import BaseHTTPServer class IPv6HTTPServer(BaseHTTPServer.HTTPServer): - address_family = socket.AF_INET6 + address_family = getattr(socket, 'AF_INET6', None) + + def __init__(self, *args, **kwargs): + if self.address_family is None: + raise RepoError('IPv6 not available on this system') + BaseHTTPServer.HTTPServer.__init__(self, *args, **kwargs) class hgwebhandler(BaseHTTPServer.BaseHTTPRequestHandler): def log_error(self, format, *args):