diff options
author | emkael <emkael@tlen.pl> | 2018-02-21 15:09:15 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-02-21 15:09:15 +0100 |
commit | be32d91f4708a926f43e825b767f68bfd8410d87 (patch) | |
tree | 03785b8a141f05e914485b7eeeb77e2c3adbd23b /jfr_playoff | |
parent | 2ccb3a3fa87627b9a2681905550e52db7e259ab0 (diff) |
?
Diffstat (limited to 'jfr_playoff')
-rw-r--r-- | jfr_playoff/settings.py | 10 |
1 files 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: |