Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/server.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 | 37fcfe52c68c |
children | 33770d2b6cf9 |
comparison
equal
deleted
inserted
replaced
28882:800ec7c048b0 | 28883:032c4c2f802a |
---|---|
13 import errno | 13 import errno |
14 import os | 14 import os |
15 import socket | 15 import socket |
16 import sys | 16 import sys |
17 import traceback | 17 import traceback |
18 import urllib | |
19 | 18 |
20 from ..i18n import _ | 19 from ..i18n import _ |
21 | 20 |
22 from .. import ( | 21 from .. import ( |
23 error, | 22 error, |
24 util, | 23 util, |
25 ) | 24 ) |
25 | |
26 urlerr = util.urlerr | |
27 urlreq = util.urlreq | |
26 | 28 |
27 from . import ( | 29 from . import ( |
28 common, | 30 common, |
29 ) | 31 ) |
30 | 32 |
36 """ | 38 """ |
37 if '?' in uri: | 39 if '?' in uri: |
38 path, query = uri.split('?', 1) | 40 path, query = uri.split('?', 1) |
39 else: | 41 else: |
40 path, query = uri, '' | 42 path, query = uri, '' |
41 return urllib.unquote(path), query | 43 return urlreq.unquote(path), query |
42 | 44 |
43 class _error_logger(object): | 45 class _error_logger(object): |
44 def __init__(self, handler): | 46 def __init__(self, handler): |
45 self.handler = handler | 47 self.handler = handler |
46 def flush(self): | 48 def flush(self): |