Shaman: added some timeouts to HTTP requests

This commit is contained in:
Sybren A. Stüvel
2019-03-06 16:00:46 +01:00
parent c2a8ff18f8
commit 44ee553c0a
3 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -189,7 +189,8 @@ class ShamanTransferrer(bat_transfer.FileTransferer):
need to be uploaded, or None if there was an error.
"""
resp = self.client.post('checkout/requirements', data=definition_file, stream=True,
headers={'Content-Type': 'text/plain'})
headers={'Content-Type': 'text/plain'},
timeout=15)
if resp.status_code >= 300:
msg = 'Error from Shaman, code %d: %s' % (resp.status_code, resp.text)
self.log.error(msg)