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-10 23:37:00 +0000 |
commit | e448fa0432d12cc54f0b540fe2cacff37135c9ed (patch) | |
tree | a22a6849fb1f870917ed230ffb282d2826d1ada9 | |
parent | 61983b9a8b607283e8662b9330c12d6b13039a78 (diff) | |
download | bitbake-e448fa0432d12cc54f0b540fe2cacff37135c9ed.tar.gz |
bitbake/fetch2: Have all fetcher exceptions derived from a common BBFetchException class
(From Poky rev: f6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/__init__.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index d9e4bc7ac..54812eec4 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -37,25 +37,28 @@ __version__ = "2" logger = logging.getLogger("BitBake.Fetch") -class MalformedUrl(Exception): +class BBFetchException(Exception): + """Class all fetch exceptions inherit from""" + +class MalformedUrl(BBFetchException): """Exception raised when encountering an invalid url""" -class FetchError(Exception): +class FetchError(BBFetchException): """Exception raised when a download fails""" -class NoMethodError(Exception): +class NoMethodError(BBFetchException): """Exception raised when there is no method to obtain a supplied url or set of urls""" -class MissingParameterError(Exception): +class MissingParameterError(BBFetchException): """Exception raised when a fetch method is missing a critical parameter in the url""" -class ParameterError(Exception): +class ParameterError(BBFetchException): """Exception raised when a url cannot be proccessed due to invalid parameters.""" -class MD5SumError(Exception): +class MD5SumError(BBFetchException): """Exception raised when a MD5SUM of a file does not match the expected one""" -class InvalidSRCREV(Exception): +class InvalidSRCREV(BBFetchException): """Exception raised when an invalid SRCREV is encountered""" def decodeurl(url): |