diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-06-10 07:47:16 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-06-10 08:23:41 -0700 |
commit | 681b73fcc04e22e692ed61650ad53c800b64cace (patch) | |
tree | 8834304fc85367b3d85946cba1dddea6934c006e /lib/bb/fetch/__init__.py | |
parent | 2c66ddc2713061ba31363ea69c24944f4a7cd3a8 (diff) | |
download | bitbake-681b73fcc04e22e692ed61650ad53c800b64cace.tar.gz |
Start ditching fatal() calls in favor of raising appropriate exceptions
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/fetch/__init__.py')
-rw-r--r-- | lib/bb/fetch/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/fetch/__init__.py b/lib/bb/fetch/__init__.py index d91ecae1..2762a0c3 100644 --- a/lib/bb/fetch/__init__.py +++ b/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.fatal(bb.msg.domain.Fetcher, "URL %s doesn't work" % u) + raise FetchError("URL %s doesn't work" % u) def localpaths(d): """ |