mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-11 20:05:09 +00:00
Handle sys.getfilesystemencoding() returning None
This commit is contained in:
parent
5db16141cc
commit
b67f7a8c51
4 changed files with 20 additions and 7 deletions
|
@ -5,11 +5,10 @@ from __future__ import division, absolute_import, print_function, unicode_litera
|
|||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
from six import iteritems, ensure_text
|
||||
|
||||
from helper import LazyLogger
|
||||
from helper import LazyLogger, get_filesystem_encoding
|
||||
|
||||
##################################################################################################
|
||||
|
||||
|
@ -34,7 +33,7 @@ class Objects(object):
|
|||
|
||||
''' Load objects mapping.
|
||||
'''
|
||||
file_dir = os.path.dirname(ensure_text(__file__, sys.getfilesystemencoding()))
|
||||
file_dir = os.path.dirname(ensure_text(__file__, get_filesystem_encoding()))
|
||||
|
||||
with open(os.path.join(file_dir, 'obj_map.json')) as infile:
|
||||
self.objects = json.load(infile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue