summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/bitbake/lib/bb/fetch2/git.py')
-rw-r--r--poky/bitbake/lib/bb/fetch2/git.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/poky/bitbake/lib/bb/fetch2/git.py b/poky/bitbake/lib/bb/fetch2/git.py
index fa41b078f..5b3793a70 100644
--- a/poky/bitbake/lib/bb/fetch2/git.py
+++ b/poky/bitbake/lib/bb/fetch2/git.py
@@ -594,7 +594,9 @@ class Git(FetchMethod):
"""
Return a unique key for the url
"""
- return "git:" + ud.host + ud.path.replace('/', '.') + ud.unresolvedrev[name]
+ # Collapse adjacent slashes
+ slash_re = re.compile(r"/+")
+ return "git:" + ud.host + slash_re.sub(".", ud.path) + ud.unresolvedrev[name]
def _lsremote(self, ud, d, search):
"""
@@ -671,7 +673,7 @@ class Git(FetchMethod):
# search for version in the line
tag = tagregex.search(tag_head)
- if tag == None:
+ if tag is None:
continue
tag = tag.group('pver')