diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-06-10 07:47:16 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:36 +0100 |
commit | 0c5b5b21f784bf3a05cd95c4162a595590cab9cc (patch) | |
tree | 8963ef9613faf4d54ba54396a003178815377ecc /bitbake | |
parent | 77a6052e39a46ad30370692ed47d492e6dc2f6f5 (diff) | |
download | poky-0c5b5b21f784bf3a05cd95c4162a595590cab9cc.tar.gz |
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')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 6478f5acaa..e87223ad6b 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -99,7 +99,7 @@ def encodeurl(decoded): | |||
99 | (type, host, path, user, pswd, p) = decoded | 99 | (type, host, path, user, pswd, p) = decoded |
100 | 100 | ||
101 | if not type or not path: | 101 | if not type or not path: |
102 | bb.msg.fatal(bb.msg.domain.Fetcher, "invalid or missing parameters for url encoding") | 102 | raise MissingParameterError("Type or path url components missing when encoding %s" % decoded) |
103 | url = '%s://' % type | 103 | url = '%s://' % type |
104 | if user: | 104 | if user: |
105 | url += "%s" % user | 105 | url += "%s" % user |
@@ -166,7 +166,7 @@ def fetcher_init(d): | |||
166 | pass | 166 | pass |
167 | pd.delDomain("BB_URI_HEADREVS") | 167 | pd.delDomain("BB_URI_HEADREVS") |
168 | else: | 168 | else: |
169 | bb.msg.fatal(bb.msg.domain.Fetcher, "Invalid SRCREV cache policy of: %s" % srcrev_policy) | 169 | raise FetchError("Invalid SRCREV cache policy of: %s" % srcrev_policy) |
170 | 170 | ||
171 | for m in methods: | 171 | for m in methods: |
172 | if hasattr(m, "init"): | 172 | if hasattr(m, "init"): |
@@ -301,7 +301,7 @@ def checkstatus(d): | |||
301 | ret = try_mirrors (d, u, mirrors, True) | 301 | ret = try_mirrors (d, u, mirrors, True) |
302 | 302 | ||
303 | if not ret: | 303 | if not ret: |
304 | bb.msg.error(bb.msg.domain.Fetcher, "URL %s doesn't work" % u) | 304 | raise FetchError("URL %s doesn't work" % u) |
305 | 305 | ||
306 | def localpaths(d): | 306 | def localpaths(d): |
307 | """ | 307 | """ |