/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/http_server.py

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import errno
18
 
import http.client as http_client
19
 
import http.server as http_server
 
18
try:
 
19
    import http.client as http_client
 
20
    import http.server as http_server
 
21
except ImportError:
 
22
    import httplib as http_client
 
23
    import SimpleHTTPServer as http_server
20
24
import os
21
25
import posixpath
22
26
import random
23
27
import re
24
28
import socket
25
29
import sys
26
 
from urllib.parse import urlparse
 
30
try:
 
31
    from urlparse import urlparse
 
32
except ImportError:
 
33
    from urllib.parse import urlparse
27
34
 
28
35
from .. import (
29
36
    osutils,
333
340
        # abandon query parameters
334
341
        path = urlparse(path)[2]
335
342
        path = posixpath.normpath(urlutils.unquote(path))
 
343
        if sys.version_info[0] == 2:
 
344
            path = path.decode('utf-8')
336
345
        words = path.split('/')
337
346
        path = self._cwd
338
347
        for num, word in enumerate(w for w in words if w):