mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add timeout to POST request
This commit is contained in:
parent
39639044ca
commit
b09d71f40b
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ def yunopaste(data):
|
|||
paste_server = "https://paste.yunohost.org"
|
||||
|
||||
try:
|
||||
r = requests.post("%s/documents" % paste_server, data=data)
|
||||
r = requests.post("%s/documents" % paste_server, data=data, timeout=30)
|
||||
except Exception as e:
|
||||
raise MoulinetteError(errno.EIO,
|
||||
"Something wrong happened while trying to paste data on paste.yunohost.org : %s" % str(e))
|
||||
|
|
Loading…
Add table
Reference in a new issue