Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/protocol.py @ 28883:032c4c2f802a
pycompat: switch to util.urlreq/util.urlerr for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 06 Apr 2016 23:22:12 +0000 |
parents | 86db5cb55d46 |
children | 5e2365698d44 |
line wrap: on
line diff
--- a/mercurial/hgweb/protocol.py Thu Apr 07 00:05:48 2016 +0000 +++ b/mercurial/hgweb/protocol.py Wed Apr 06 23:22:12 2016 +0000 @@ -8,7 +8,6 @@ from __future__ import absolute_import import cgi -import urllib import zlib from .common import ( @@ -21,6 +20,9 @@ ) stringio = util.stringio +urlerr = util.urlerr +urlreq = util.urlreq + HGTYPE = 'application/mercurial-0.1' HGERRTYPE = 'application/hg-error' @@ -82,8 +84,8 @@ def _client(self): return 'remote:%s:%s:%s' % ( self.req.env.get('wsgi.url_scheme') or 'http', - urllib.quote(self.req.env.get('REMOTE_HOST', '')), - urllib.quote(self.req.env.get('REMOTE_USER', ''))) + urlreq.quote(self.req.env.get('REMOTE_HOST', '')), + urlreq.quote(self.req.env.get('REMOTE_USER', ''))) def iscmd(cmd): return cmd in wireproto.commands