Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
867:0cd2ee61b10a | 896:01215ad04283 |
---|---|
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(), |