summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-04 10:26:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:06:36 +0000
commitd08397ba4d1331993300eacbb2f78fcfef19c1cf (patch)
tree374d8aa46a69fbae08d2b3e8e7456a5c61005e4c /bitbake/lib/bb/fetch2/git.py
parentf6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815 (diff)
downloadpoky-d08397ba4d1331993300eacbb2f78fcfef19c1cf.tar.gz
bitbake/fetch2: Rewrite and improve exception handling, reusing core functions for common operations where possible
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/git.py')
-rw-r--r--bitbake/lib/bb/fetch2/git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 392491ed87..1ae1d40302 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -59,7 +59,7 @@ class Git(Fetch):
59 59
60 branches = ud.parm.get("branch", "master").split(',') 60 branches = ud.parm.get("branch", "master").split(',')
61 if len(branches) != len(ud.names): 61 if len(branches) != len(ud.names):
62 raise bb.fetch2.ParameterError("SRC_URI (%) name and branch number mismatch" % ud.url) 62 raise bb.fetch2.ParameterError("The number of name and branch parameters is not balanced", ud.url)
63 ud.branches = {} 63 ud.branches = {}
64 for name in ud.names: 64 for name in ud.names:
65 branch = branches[ud.names.index(name)] 65 branch = branches[ud.names.index(name)]
@@ -194,7 +194,7 @@ class Git(Fetch):
194 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name]) 194 cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
195 output = runfetchcmd(cmd, d, True) 195 output = runfetchcmd(cmd, d, True)
196 if not output: 196 if not output:
197 raise bb.fetch2.FetchError("Fetch command %s gave empty output\n" % (cmd)) 197 raise bb.fetch2.FetchError("The command %s gave empty output unexpectedly" % cmd, url)
198 return output.split()[0] 198 return output.split()[0]
199 199
200 def _build_revision(self, url, ud, d, name): 200 def _build_revision(self, url, ud, d, name):