Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb.py @ 883:63ca8a68d59e
Update to tip.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Fri, 12 Aug 2005 07:42:32 -0800 |
parents | c2e77581bc84 bc9ca4d51d23 |
children | 6594ba2a0f51 882756761433 391de0bcc722 62ec665759f2 |
comparison
equal
deleted
inserted
replaced
880:409a9a7b0da2 | 883:63ca8a68d59e |
---|---|
706 accesslog = sys.stdout, errorlog = sys.stderr): | 706 accesslog = sys.stdout, errorlog = sys.stderr): |
707 | 707 |
708 import BaseHTTPServer | 708 import BaseHTTPServer |
709 | 709 |
710 class IPv6HTTPServer(BaseHTTPServer.HTTPServer): | 710 class IPv6HTTPServer(BaseHTTPServer.HTTPServer): |
711 address_family = socket.AF_INET6 | 711 address_family = getattr(socket, 'AF_INET6', None) |
712 | |
713 def __init__(self, *args, **kwargs): | |
714 if self.address_family is None: | |
715 raise RepoError('IPv6 not available on this system') | |
716 BaseHTTPServer.HTTPServer.__init__(self, *args, **kwargs) | |
712 | 717 |
713 class hgwebhandler(BaseHTTPServer.BaseHTTPRequestHandler): | 718 class hgwebhandler(BaseHTTPServer.BaseHTTPRequestHandler): |
714 def log_error(self, format, *args): | 719 def log_error(self, format, *args): |
715 errorlog.write("%s - - [%s] %s\n" % (self.address_string(), | 720 errorlog.write("%s - - [%s] %s\n" % (self.address_string(), |
716 self.log_date_time_string(), | 721 self.log_date_time_string(), |