]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/fetch2: Have all fetcher exceptions derived from a common BBFetchException...
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Feb 2011 23:23:11 +0000 (23:23 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Feb 2011 09:06:35 +0000 (09:06 +0000)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index d9e4bc7ac65225ba690d5648ee6be459fb0ba24a..54812eec438075e918de5b11958db47b70c125ce 100644 (file)
@@ -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):