From 3f22f15dd392a8c612383fa060defe16a295ed34 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 18 Dec 2016 23:57:56 +0100 Subject: [PATCH] [fix] add timeout to fetchlist's wget --- src/yunohost/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/app.py b/src/yunohost/app.py index 85693a0dd..a35ccb7e6 100644 --- a/src/yunohost/app.py +++ b/src/yunohost/app.py @@ -99,7 +99,7 @@ def app_fetchlist(url=None, name=None): m18n.n('custom_appslist_name_required')) list_file = '%s/%s.json' % (repo_path, name) - if os.system('wget "%s" -O "%s.tmp"' % (url, list_file)) != 0: + if os.system('wget --timeout=30 "%s" -O "%s.tmp"' % (url, list_file)) != 0: os.remove('%s.tmp' % list_file) raise MoulinetteError(errno.EBADR, m18n.n('appslist_retrieve_error'))