diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-03 23:23:11 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-07 09:06:35 +0000 |
| commit | f6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815 (patch) | |
| tree | 6543e0654292419adff2161fb7c6e8844d3dbbc9 /bitbake/lib/bb/fetch2 | |
| parent | 604037de4bc3826b9b7c60eb2e7efc7788363cad (diff) | |
| download | poky-f6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815.tar.gz | |
bitbake/fetch2: Have all fetcher exceptions derived from a common BBFetchException class
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 17 |
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 | ||
| 38 | logger = logging.getLogger("BitBake.Fetch") | 38 | logger = logging.getLogger("BitBake.Fetch") |
| 39 | 39 | ||
| 40 | class MalformedUrl(Exception): | 40 | class BBFetchException(Exception): |
| 41 | """Class all fetch exceptions inherit from""" | ||
| 42 | |||
| 43 | class MalformedUrl(BBFetchException): | ||
| 41 | """Exception raised when encountering an invalid url""" | 44 | """Exception raised when encountering an invalid url""" |
| 42 | 45 | ||
| 43 | class FetchError(Exception): | 46 | class FetchError(BBFetchException): |
| 44 | """Exception raised when a download fails""" | 47 | """Exception raised when a download fails""" |
| 45 | 48 | ||
| 46 | class NoMethodError(Exception): | 49 | class 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 | ||
| 49 | class MissingParameterError(Exception): | 52 | class 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 | ||
| 52 | class ParameterError(Exception): | 55 | class 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 | ||
| 55 | class MD5SumError(Exception): | 58 | class 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 | ||
| 58 | class InvalidSRCREV(Exception): | 61 | class InvalidSRCREV(BBFetchException): |
| 59 | """Exception raised when an invalid SRCREV is encountered""" | 62 | """Exception raised when an invalid SRCREV is encountered""" |
| 60 | 63 | ||
| 61 | def decodeurl(url): | 64 | def decodeurl(url): |
