items/download: wrap node.run() in try..except to avoid killing the whole apply
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
f312f590c1
commit
672660d131
1 changed files with 8 additions and 5 deletions
|
@ -53,11 +53,14 @@ class Download(Item):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# download file
|
# download file
|
||||||
self.node.run("curl -L {verify}-s -o {file} -- {url}".format(
|
try:
|
||||||
verify="" if self.attributes.get('verifySSL', True) else "-k ",
|
self.node.run("curl -L {verify}-s -o {file} -- {url}".format(
|
||||||
file=quote(self.name),
|
verify="" if self.attributes.get('verifySSL', True) else "-k ",
|
||||||
url=quote(self.attributes['url'])
|
file=quote(self.name),
|
||||||
))
|
url=quote(self.attributes['url'])
|
||||||
|
))
|
||||||
|
except:
|
||||||
|
return False
|
||||||
|
|
||||||
# check hash
|
# check hash
|
||||||
sha256 = self.__hash_remote_file(self.name)
|
sha256 = self.__hash_remote_file(self.name)
|
||||||
|
|
Loading…
Reference in a new issue