Mercurial > hg
comparison tests/tinyproxy.py @ 29431:80880ad3fccd
py3: conditionalize the urlparse import
The urlparse library is renamed to urllib.parse in python 3
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Mon, 27 Jun 2016 16:16:10 +0530 |
parents | 256d90bb12fa |
children | 33770d2b6cf9 |
comparison
equal
deleted
inserted
replaced
29430:72065b3b90a4 | 29431:80880ad3fccd |
---|---|
18 import SocketServer | 18 import SocketServer |
19 import os | 19 import os |
20 import select | 20 import select |
21 import socket | 21 import socket |
22 import sys | 22 import sys |
23 import urlparse | 23 |
24 from mercurial import util | |
25 | |
26 urlparse = util.urlparse | |
24 | 27 |
25 class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler): | 28 class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler): |
26 __base = BaseHTTPServer.BaseHTTPRequestHandler | 29 __base = BaseHTTPServer.BaseHTTPRequestHandler |
27 __base_handle = __base.handle | 30 __base_handle = __base.handle |
28 | 31 |