summaryrefslogtreecommitdiff
path: root/jfr_playoff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-01-25 15:03:07 +0100
committeremkael <emkael@tlen.pl>2018-01-25 15:03:07 +0100
commit47da3ed12b6359306d36c145cf2df3a78c34bb25 (patch)
tree838298259c7a58cf8817ea1cd28b53b0eddc9d9e /jfr_playoff
parent3c684269d94c10852197f41d144e0e9d65dd3a3b (diff)
Handling UTF-8 with BOM configuration files
Diffstat (limited to 'jfr_playoff')
-rw-r--r--jfr_playoff/settings.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/jfr_playoff/settings.py b/jfr_playoff/settings.py
index 0bb61fc..ba03d72 100644
--- a/jfr_playoff/settings.py
+++ b/jfr_playoff/settings.py
@@ -29,7 +29,8 @@ class PlayoffSettings(object):
'JSON settings file: ').decode(sys.stdin.encoding)
if self.settings is None:
- self.settings = json.load(open(unicode(self.settings_file)))
+ self.settings = json.loads(
+ open(unicode(self.settings_file)).read().decode('utf-8-sig'))
def has_section(self, key):
self.load()