summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-12-02 10:58:35 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-05 16:14:00 +0000
commitb8b2f4287c9125542b18a294c0a94ed89a7e73a8 (patch)
treef8ff2f282ceb5d6759c643826f1ba081afe1819c
parentbd5a727c8447bcb747c1d2463b7de2ab6d21a7de (diff)
downloadbitbake-b8b2f4287c9125542b18a294c0a94ed89a7e73a8.tar.gz
fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabled
BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 19a79fdbf..3af56e5d0 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -274,9 +274,9 @@ def verify_checksum(u, ud, d):
strict = d.getVar("BB_STRICT_CHECKSUM", True) or None
if (strict and ud.md5_expected == None and ud.sha256_expected == None):
raise FetchError('No checksum specified for %s, please add at least one to the recipe:\n'
- 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"', u,
- ud.localpath, ud.md5_name, md5data,
- ud.sha256_name, sha256data)
+ 'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' %
+ (ud.localpath, ud.md5_name, md5data,
+ ud.sha256_name, sha256data), u)
# Log missing sums so user can more easily add them
if ud.md5_expected == None: