summaryrefslogtreecommitdiff
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)
downloadopenembedded-core-d08397ba4d1331993300eacbb2f78fcfef19c1cf.tar.gz
openembedded-core-d08397ba4d1331993300eacbb2f78fcfef19c1cf.tar.bz2
openembedded-core-d08397ba4d1331993300eacbb2f78fcfef19c1cf.tar.xz
openembedded-core-d08397ba4d1331993300eacbb2f78fcfef19c1cf.zip
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 392491ed8..1ae1d4030 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -59,7 +59,7 @@ class Git(Fetch):
branches = ud.parm.get("branch", "master").split(',')
if len(branches) != len(ud.names):
- raise bb.fetch2.ParameterError("SRC_URI (%) name and branch number mismatch" % ud.url)
+ raise bb.fetch2.ParameterError("The number of name and branch parameters is not balanced", ud.url)
ud.branches = {}
for name in ud.names:
branch = branches[ud.names.index(name)]
@@ -194,7 +194,7 @@ class Git(Fetch):
cmd = "%s ls-remote %s://%s%s%s %s" % (basecmd, ud.proto, username, ud.host, ud.path, ud.branches[name])
output = runfetchcmd(cmd, d, True)
if not output:
- raise bb.fetch2.FetchError("Fetch command %s gave empty output\n" % (cmd))
+ raise bb.fetch2.FetchError("The command %s gave empty output unexpectedly" % cmd, url)
return output.split()[0]
def _build_revision(self, url, ud, d, name):