From b09d71f40ba5450dfa9f7c27c8c198c87a45d052 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 22 Aug 2018 16:26:44 +0000 Subject: [PATCH] Add timeout to POST request --- src/yunohost/utils/yunopaste.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/utils/yunopaste.py b/src/yunohost/utils/yunopaste.py index c084d78ce..6df4d0ca6 100644 --- a/src/yunohost/utils/yunopaste.py +++ b/src/yunohost/utils/yunopaste.py @@ -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))