Patchwork [bitbake-devel,RFC,5/5] bb.fetch2.git: use the _gen_git_url() function

login
register
mail settings
Submitter Olof Johansson
Date Dec. 12, 2013, 4:48 p.m.
Message ID <1386866938-5932-6-git-send-email-olof.johansson@axis.com>
Download mbox | patch
Permalink /patch/63283/
State New
Headers show

Comments

Olof Johansson - Dec. 12, 2013, 4:48 p.m.
Don't generate the url in several places.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
---
 lib/bb/fetch2/git.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Patch

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index c01c82b..bc792e6 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -166,11 +166,6 @@  class Git(FetchMethod):
     def download(self, ud, d):
         """Fetch url"""
 
-        if ud.user:
-            username = ud.user + '@'
-        else:
-            username = ""
-
         ud.repochanged = not os.path.exists(ud.fullmirror)
 
         # If the checkout doesn't exist and the mirror tarball does, extract it
@@ -179,7 +174,7 @@  class Git(FetchMethod):
             os.chdir(ud.clonedir)
             runfetchcmd("tar -xzf %s" % (ud.fullmirror), d)
 
-        repourl = "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
+        repourl = self._gen_git_url(ud, d)
 
         # If the repo still doesn't exist, fallback to cloning it
         if not os.path.exists(ud.clonedir):