summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-11 21:59:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-11 21:59:23 +0000
commit4a226460d5e158e8adbf74a68717cb9a923e8009 (patch)
tree6d590c38fa0332e60face455efe63a665ead4b94 /bitbake/lib/bb
parent0f6efe994836c653916f706ce8cf17dbfbdb424e (diff)
downloadopenembedded-core-4a226460d5e158e8adbf74a68717cb9a923e8009.tar.gz
openembedded-core-4a226460d5e158e8adbf74a68717cb9a923e8009.tar.bz2
openembedded-core-4a226460d5e158e8adbf74a68717cb9a923e8009.zip
bitbake/fetch2: Fix message about md5 checksums when sha256 is incorrect
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 9356487ea6..bc1824b01b 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -98,7 +98,7 @@ class ParameterError(BBFetchException):
class MD5SumError(BBFetchException):
"""Exception raised when a MD5 checksum of a file does not match for a downloaded file"""
def __init__(self, path, wanted, got, url):
- msg = "File: '%s' has md5 sum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
+ msg = "File: '%s' has md5 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
self.url = url
self.path = path
self.wanted = wanted
@@ -108,6 +108,14 @@ class MD5SumError(BBFetchException):
class SHA256SumError(MD5SumError):
"""Exception raised when a SHA256 checksum of a file does not match for a downloaded file"""
+ def __init__(self, path, wanted, got, url):
+ msg = "File: '%s' has sha256 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
+ self.url = url
+ self.path = path
+ self.wanted = wanted
+ self.got = got
+ BBFetchException.__init__(self, msg)
+ self.args = (path, wanted, got, url)
def decodeurl(url):
"""Decodes an URL into the tokens (scheme, network location, path,