From b0735af6cec3c8562c839f2060a61ebb30bb43da Mon Sep 17 00:00:00 2001 From: opi Date: Thu, 23 Oct 2014 12:07:49 +0200 Subject: [PATCH] [fix] Do not load conf.json before overriding content. --- app.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index 0f1e6bc78..f57e1fdfb 100644 --- a/app.py +++ b/app.py @@ -924,10 +924,7 @@ def app_ssowatconf(auth): for domain in domains: skipped_urls.extend(['/yunohost/admin', '/yunohost/api']) - with open('/etc/ssowat/conf.json') as f: - conf_dict = json.load(f) - - conf_dict.update({ + conf_dict = { 'portal_domain': main_domain, 'portal_path': '/yunohost/sso/', 'additional_headers': { @@ -945,7 +942,7 @@ def app_ssowatconf(auth): 'protected_regex': protected_regex, 'redirected_regex': redirected_regex, 'users': users, - }) + } with open('/etc/ssowat/conf.json', 'w+') as f: json.dump(conf_dict, f, sort_keys=True, indent=4)