~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-18 15:43:47 UTC
  • mto: This revision was merged to the branch mainline in revision 6383.
  • Revision ID: jelmer@samba.org-20111218154347-d42sxp2qzn36uo2r
Add urlutils.quote / urlutils.unquote.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
lazy_import(globals(), """
34
34
import errno
35
35
from stat import S_ISDIR
36
 
import urllib
37
36
import urlparse
38
37
 
39
38
from bzrlib import (
1415
1414
 
1416
1415
        :return: The corresponding URL.
1417
1416
        """
1418
 
        netloc = urllib.quote(host)
 
1417
        netloc = urlutils.quote(host)
1419
1418
        if user is not None:
1420
1419
            # Note that we don't put the password back even if we
1421
1420
            # have one so that it doesn't get accidentally
1422
1421
            # exposed.
1423
 
            netloc = '%s@%s' % (urllib.quote(user), netloc)
 
1422
            netloc = '%s@%s' % (urlutils.quote(user), netloc)
1424
1423
        if port is not None:
1425
1424
            netloc = '%s:%d' % (netloc, port)
1426
1425
        path = urlutils.escape(path)