From be32d91f4708a926f43e825b767f68bfd8410d87 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 21 Feb 2018 15:09:15 +0100 Subject: ? --- jfr_playoff/settings.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py index 31b29e7..1a6b795 100644 --- a/jfr_playoff/settings.py +++ b/jfr_playoff/settings.py @@ -25,15 +25,13 @@ class PlayoffSettings(object): new_config=None, remote_url=None, overwrite=True): try: - print locals() - if remote_url is not None: - remote_file = urllib.urlopen(remote_url) - remote_content = remote_file.read().decode('utf-8-sig') - remote_config = json.loads(remote_content) - remote_config = new_config if new_config is not None else json.loads(remote_content) + remote_config = new_config if new_config is not None else json.loads( + urllib.urlopen(remote_url).read().decode('utf-8-sig')) + print remote_config for key, value in remote_config.iteritems(): if (key not in base_config) or overwrite: base_config[key] = value + print base_config except Exception as e: print 'WARNING: unable to merge remote config: %s' % (str(e)) if remote_url is not None: -- cgit v1.2.3