/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/git/urls.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
def git_url_to_bzr_url(location):
30
30
    url = URL.from_string(location)
31
 
    if url.scheme not in KNOWN_GIT_SCHEMES and not url.scheme.startswith('chroot-'):
 
31
    if (url.scheme not in KNOWN_GIT_SCHEMES
 
32
            and not url.scheme.startswith('chroot-')):
32
33
        try:
33
34
            (username, host, path) = parse_rsync_url(location)
34
35
        except ValueError:
35
36
            return location
36
37
        else:
37
38
            url = URL(
38
 
                    scheme='git+ssh',
39
 
                    quoted_user=(quote(username) if username else None),
40
 
                    quoted_password=None,
41
 
                    quoted_host=quote(host),
42
 
                    port=None,
43
 
                    quoted_path=quote(path, safe="/~"))
 
39
                scheme='git+ssh',
 
40
                quoted_user=(quote(username) if username else None),
 
41
                quoted_password=None,
 
42
                quoted_host=quote(host),
 
43
                port=None,
 
44
                quoted_path=quote(path, safe="/~"))
44
45
        return str(url)
45
46
    else:
46
47
        return location