summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-03 23:23:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:06:35 +0000
commitf6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815 (patch)
tree6543e0654292419adff2161fb7c6e8844d3dbbc9
parent604037de4bc3826b9b7c60eb2e7efc7788363cad (diff)
downloadpoky-f6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815.tar.gz
bitbake/fetch2: Have all fetcher exceptions derived from a common BBFetchException class
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d9e4bc7ac6..54812eec43 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -37,25 +37,28 @@ __version__ = "2"
37 37
38logger = logging.getLogger("BitBake.Fetch") 38logger = logging.getLogger("BitBake.Fetch")
39 39
40class MalformedUrl(Exception): 40class BBFetchException(Exception):
41 """Class all fetch exceptions inherit from"""
42
43class MalformedUrl(BBFetchException):
41 """Exception raised when encountering an invalid url""" 44 """Exception raised when encountering an invalid url"""
42 45
43class FetchError(Exception): 46class FetchError(BBFetchException):
44 """Exception raised when a download fails""" 47 """Exception raised when a download fails"""
45 48
46class NoMethodError(Exception): 49class NoMethodError(BBFetchException):
47 """Exception raised when there is no method to obtain a supplied url or set of urls""" 50 """Exception raised when there is no method to obtain a supplied url or set of urls"""
48 51
49class MissingParameterError(Exception): 52class MissingParameterError(BBFetchException):
50 """Exception raised when a fetch method is missing a critical parameter in the url""" 53 """Exception raised when a fetch method is missing a critical parameter in the url"""
51 54
52class ParameterError(Exception): 55class ParameterError(BBFetchException):
53 """Exception raised when a url cannot be proccessed due to invalid parameters.""" 56 """Exception raised when a url cannot be proccessed due to invalid parameters."""
54 57
55class MD5SumError(Exception): 58class MD5SumError(BBFetchException):
56 """Exception raised when a MD5SUM of a file does not match the expected one""" 59 """Exception raised when a MD5SUM of a file does not match the expected one"""
57 60
58class InvalidSRCREV(Exception): 61class InvalidSRCREV(BBFetchException):
59 """Exception raised when an invalid SRCREV is encountered""" 62 """Exception raised when an invalid SRCREV is encountered"""
60 63
61def decodeurl(url): 64def decodeurl(url):