* Fix typos

* Indicate unicode dict

* Fix artistid

* Attempt to fix encoding
This commit is contained in:
angelblue05 2016-10-29 03:15:16 -05:00 committed by GitHub
parent ba22e26c06
commit 85d054f33a
4 changed files with 12 additions and 8 deletions

View file

@ -34,7 +34,7 @@ class Credentials(object):
if self.credentials is None:
try:
with open(os.path.join(self.path, 'data.txt')) as infile:
self.credentials = json.load(infile)
self.credentials = json.load(unicode(infile))
except Exception as e: # File is either empty or missing
log.warn(e)
@ -54,7 +54,7 @@ class Credentials(object):
self.credentials = data
# Set credentials to file
with open(os.path.join(self.path, 'data.txt'), 'w') as outfile:
json.dump(data, outfile, indent=4, ensure_ascii=False)
json.dump(unicode(data), outfile, indent=4, ensure_ascii=False)
else:
self._clear()