mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Add timeouts to all s3 queries
This commit is contained in:
parent
5391dd0a8d
commit
cb654bbf2c
@ -156,20 +156,23 @@ def query(key, keyid, method='GET', params=None, headers=None,
|
||||
headers=headers,
|
||||
data=data,
|
||||
verify=verify_ssl,
|
||||
stream=True)
|
||||
stream=True,
|
||||
timeout=300)
|
||||
elif method == 'GET' and local_file and not return_bin:
|
||||
result = requests.request(method,
|
||||
requesturl,
|
||||
headers=headers,
|
||||
data=data,
|
||||
verify=verify_ssl,
|
||||
stream=True)
|
||||
stream=True,
|
||||
timeout=300)
|
||||
else:
|
||||
result = requests.request(method,
|
||||
requesturl,
|
||||
headers=headers,
|
||||
data=data,
|
||||
verify=verify_ssl)
|
||||
verify=verify_ssl,
|
||||
timeout=300)
|
||||
finally:
|
||||
if data is not None:
|
||||
data.close()
|
||||
|
Loading…
Reference in New Issue
Block a user