mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-12-27 14:58:59 +00:00
add timeout to requests.get
This commit is contained in:
parent
9306a72b99
commit
fad45bd6d3
1 changed files with 1 additions and 1 deletions
2
webui.py
2
webui.py
|
@ -132,7 +132,7 @@ def bot_create():
|
|||
session['instance'] = re.match(r"^(?:https?:\/\/)?(.*)", request.form['instance']).group(1)
|
||||
|
||||
# check for mastodon/pleroma
|
||||
r = requests.get("https://{}/api/v1/instance".format(session['instance']))
|
||||
r = requests.get("https://{}/api/v1/instance".format(session['instance']), timeout=10)
|
||||
if r.status_code == 200:
|
||||
j = r.json()
|
||||
if "Pleroma" in j['version']:
|
||||
|
|
Loading…
Reference in a new issue