diff options
author | emkael <emkael@tlen.pl> | 2018-02-21 14:51:49 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-02-21 14:51:49 +0100 |
commit | 0dd9dacdf08387d8786b7ae6bbe7458e789f4260 (patch) | |
tree | c3489f1f9771017f92869a1397606066206136fb | |
parent | 89ea46c17684a3246da18557b1096232d2ee47bc (diff) |
Verbose information on urllib connection
-rw-r--r-- | jfr_playoff/settings.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py index 963dbf0..5017223 100644 --- a/jfr_playoff/settings.py +++ b/jfr_playoff/settings.py @@ -25,8 +25,10 @@ class PlayoffSettings(object): new_config=None, remote_url=None, overwrite=True): try: - remote_file = urllib.urlopen(remote_url).read().decode('utf-8-sig') - remote_config = new_config if new_config is not None else json.loads(remote_file) + remote_file = urllib.urlopen(remote_url) + print remote_file.info() + remote_content = remote_file.read().decode('utf-8-sig') + remote_config = new_config if new_config is not None else json.loads(remote_content) for key, value in remote_config.iteritems(): if (key not in base_config) or overwrite: base_config[key] = value |