summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/wget.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-04 10:26:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:06:36 +0000
commitd08397ba4d1331993300eacbb2f78fcfef19c1cf (patch)
tree374d8aa46a69fbae08d2b3e8e7456a5c61005e4c /bitbake/lib/bb/fetch2/wget.py
parentf6eefb3ca3bb2a5ea0ec1364bdb0bc41ae58c815 (diff)
downloadast2050-yocto-poky-d08397ba4d1331993300eacbb2f78fcfef19c1cf.zip
ast2050-yocto-poky-d08397ba4d1331993300eacbb2f78fcfef19c1cf.tar.gz
bitbake/fetch2: Rewrite and improve exception handling, reusing core functions for common operations where possible
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/wget.py')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 8d62372..e33265e 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -72,20 +72,15 @@ class Wget(Fetch):
# Sanity check since wget can pretend it succeed when it didn't
# Also, this used to happen if sourceforge sent us to the mirror page
if not os.path.exists(ud.localpath) and not checkonly:
- logger.debug(2, "The fetch command for %s returned success but %s doesn't exist?...", uri, ud.localpath)
- return False
-
- return True
+ raise FetchError("The fetch command returned success but %s doesn't exist?!" % (uri, ud.localpath), uri)
localdata = data.createCopy(d)
data.setVar('OVERRIDES', "wget:" + data.getVar('OVERRIDES', localdata), localdata)
data.update_data(localdata)
- if fetch_uri(uri, ud, localdata):
- return True
-
- raise FetchError(uri)
-
+ fetch_uri(uri, ud, localdata)
+
+ return True
def checkstatus(self, uri, ud, d):
return self.download(uri, ud, d, True)
OpenPOWER on IntegriCloud