/breezy-svn/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy-svn/trunk

« back to all changes in this revision

Viewing changes to auth.py

  • Committer: Jelmer Vernooij
  • Date: 2020-01-31 19:40:01 UTC
  • Revision ID: jelmer@jelmer.uk-20200131194001-ri4z8wyq0cvymo20
More python3/breezy compat fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
 
180
180
    :param url: URL to create auth baton for.
181
181
    """
182
 
    import urlparse
 
182
    try:
 
183
        import urllib.parse as urlparse
 
184
    except ImportError:  # python < 3
 
185
        import urlparse
183
186
    (scheme, netloc, path, _, _) = urlparse.urlsplit(url)
184
187
    (creds, host) = urllib.splituser(netloc)
185
188
    (host, port) = urllib.splitport(host)