summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 07:47:16 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:36 +0100
commit0c5b5b21f784bf3a05cd95c4162a595590cab9cc (patch)
tree8963ef9613faf4d54ba54396a003178815377ecc /bitbake/lib/bb
parent77a6052e39a46ad30370692ed47d492e6dc2f6f5 (diff)
downloadopenembedded-core-0c5b5b21f784bf3a05cd95c4162a595590cab9cc.tar.gz
openembedded-core-0c5b5b21f784bf3a05cd95c4162a595590cab9cc.tar.bz2
openembedded-core-0c5b5b21f784bf3a05cd95c4162a595590cab9cc.tar.xz
openembedded-core-0c5b5b21f784bf3a05cd95c4162a595590cab9cc.zip
Start ditching fatal() calls in favor of raising appropriate exceptions
(Bitbake rev: 681b73fcc04e22e692ed61650ad53c800b64cace) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py
index 6478f5aca..e87223ad6 100644
--- a/bitbake/lib/bb/fetch/__init__.py
+++ b/bitbake/lib/bb/fetch/__init__.py
@@ -99,7 +99,7 @@ def encodeurl(decoded):
(type, host, path, user, pswd, p) = decoded
if not type or not path:
- bb.msg.fatal(bb.msg.domain.Fetcher, "invalid or missing parameters for url encoding")
+ raise MissingParameterError("Type or path url components missing when encoding %s" % decoded)
url = '%s://' % type
if user:
url += "%s" % user
@@ -166,7 +166,7 @@ def fetcher_init(d):
pass
pd.delDomain("BB_URI_HEADREVS")
else:
- bb.msg.fatal(bb.msg.domain.Fetcher, "Invalid SRCREV cache policy of: %s" % srcrev_policy)
+ raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy)
for m in methods:
if hasattr(m, "init"):
@@ -301,7 +301,7 @@ def checkstatus(d):
ret = try_mirrors (d, u, mirrors, True)
if not ret:
- bb.msg.error(bb.msg.domain.Fetcher, "URL %s doesn't work" % u)
+ raise FetchError("URL %s doesn't work" % u)
def localpaths(d):
"""