From d08397ba4d1331993300eacbb2f78fcfef19c1cf Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 4 Feb 2011 10:26:21 +0000 Subject: bitbake/fetch2: Rewrite and improve exception handling, reusing core functions for common operations where possible Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch2/git.py') 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): -- cgit v1.2.3