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

This commit is contained in:
Franzi 2020-10-03 16:33:41 +02:00
parent f312f590c1
commit 672660d131
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -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)