From c58fb7342a32a69d8d115be56ea6ac5828232b2d Mon Sep 17 00:00:00 2001 From: Kload Date: Thu, 12 Jun 2014 09:27:56 +0200 Subject: [PATCH] [fix] Do not fail at fetching list when not connected --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index b13dd098..bc1983a6 100644 --- a/app.py +++ b/app.py @@ -869,7 +869,12 @@ def app_ssowatconf(auth): redirected_regex = { main_domain +'/yunohost[\/]?$': 'https://'+ main_domain +'/yunohost/sso/' } apps = {} - for app in app_list()['apps']: + try: + apps_list = app_list()['apps'] + except: + apps_list = [] + + for app in apps_list: if _is_installed(app['id']): with open(apps_setting_path + app['id'] +'/settings.yml') as f: app_settings = yaml.load(f)