summaryrefslogtreecommitdiff
path: root/jfr_playoff/settings.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-21 15:52:11 +0100
committeremkael <emkael@tlen.pl>2018-02-21 15:52:11 +0100
commitc69cade1b7dcecfbdb45a2da59bafa6f1a0bf7ea (patch)
tree43e8b2e00fb505eaaa8821df490fce8f3b4687f0 /jfr_playoff/settings.py
parentccc54fde2f8c9301962e9c6f464d5f2eacd5506a (diff)
Migrating from urllib to requestsv1.1.0
Diffstat (limited to 'jfr_playoff/settings.py')
-rw-r--r--jfr_playoff/settings.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py
index acfd417..9d727a7 100644
--- a/jfr_playoff/settings.py
+++ b/jfr_playoff/settings.py
@@ -1,8 +1,8 @@
import glob
import json
import readline
+import requests
import sys
-import urllib
def complete_filename(text, state):
@@ -26,8 +26,7 @@ class PlayoffSettings(object):
overwrite=True):
try:
remote_config = new_config if new_config is not None else \
- json.loads(urllib.urlopen(
- remote_url).read().decode('utf-8-sig'))
+ json.loads(requests.get(remote_url).text)
for key, value in remote_config.iteritems():
if (key not in base_config) or overwrite:
base_config[key] = value