mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Add timeout to requests
This commit is contained in:
@@ -25,7 +25,7 @@ def createShaper():
|
|||||||
|
|
||||||
requestConfig = objects.defaults_deep({'params': {}}, restconf.get('requestsConfig'), requestsBaseConfig)
|
requestConfig = objects.defaults_deep({'params': {}}, restconf.get('requestsConfig'), requestsBaseConfig)
|
||||||
|
|
||||||
raw = get(devicesURL, **requestConfig)
|
raw = get(devicesURL, **requestConfig, timeout=10)
|
||||||
|
|
||||||
if raw.status_code != 200:
|
if raw.status_code != 200:
|
||||||
print('Failed to request ' + devicesURL + ', got ' + str(raw.status_code))
|
print('Failed to request ' + devicesURL + ', got ' + str(raw.status_code))
|
||||||
|
|||||||
Reference in New Issue
Block a user