mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-21 15:57:24 -06:00
Add timeout to requests
This commit is contained in:
parent
75bcc598a9
commit
822f83407a
@ -13,7 +13,7 @@ def uispRequest(target):
|
|||||||
from ispConfig import UISPbaseURL, uispAuthToken
|
from ispConfig import UISPbaseURL, uispAuthToken
|
||||||
url = UISPbaseURL + "/nms/api/v2.1/" + target
|
url = UISPbaseURL + "/nms/api/v2.1/" + target
|
||||||
headers = {'accept': 'application/json', 'x-auth-token': uispAuthToken}
|
headers = {'accept': 'application/json', 'x-auth-token': uispAuthToken}
|
||||||
r = requests.get(url, headers=headers)
|
r = requests.get(url, headers=headers, timeout=10)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
def buildFlatGraph():
|
def buildFlatGraph():
|
||||||
|
Loading…
Reference in New Issue
Block a user