Merge pull request #81 from thunderstruck47/master
Don't rely on platform specific encoding for Python 3
This commit is contained in:
commit
ec7b5f26d4
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import os
|
|||
import glob
|
||||
import copy
|
||||
import json
|
||||
import io
|
||||
|
||||
import bumblebee.error
|
||||
|
||||
|
@ -109,7 +110,7 @@ class Theme(object):
|
|||
|
||||
if os.path.isfile(themefile):
|
||||
try:
|
||||
with open(themefile) as data:
|
||||
with io.open(themefile,encoding="utf-8") as data:
|
||||
return json.load(data)
|
||||
except ValueError as exception:
|
||||
raise bumblebee.error.ThemeLoadError("JSON error: {}".format(exception))
|
||||
|
|
Loading…
Reference in a new issue