summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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):
98class MD5SumError(BBFetchException): 98class MD5SumError(BBFetchException):
99 """Exception raised when a MD5 checksum of a file does not match for a downloaded file""" 99 """Exception raised when a MD5 checksum of a file does not match for a downloaded file"""
100 def __init__(self, path, wanted, got, url): 100 def __init__(self, path, wanted, got, url):
101 msg = "File: '%s' has md5 sum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url) 101 msg = "File: '%s' has md5 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
102 self.url = url 102 self.url = url
103 self.path = path 103 self.path = path
104 self.wanted = wanted 104 self.wanted = wanted
@@ -108,6 +108,14 @@ class MD5SumError(BBFetchException):
108 108
109class SHA256SumError(MD5SumError): 109class SHA256SumError(MD5SumError):
110 """Exception raised when a SHA256 checksum of a file does not match for a downloaded file""" 110 """Exception raised when a SHA256 checksum of a file does not match for a downloaded file"""
111 def __init__(self, path, wanted, got, url):
112 msg = "File: '%s' has sha256 checksum %s when %s was expected (from URL: '%s')" % (path, got, wanted, url)
113 self.url = url
114 self.path = path
115 self.wanted = wanted
116 self.got = got
117 BBFetchException.__init__(self, msg)
118 self.args = (path, wanted, got, url)
111 119
112def decodeurl(url): 120def decodeurl(url):
113 """Decodes an URL into the tokens (scheme, network location, path, 121 """Decodes an URL into the tokens (scheme, network location, path,