mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-12-13 10:33:16 +00:00
Remove six: string coercion
This commit is contained in:
parent
0e5c5e4c07
commit
57ed8bdedd
8 changed files with 17 additions and 34 deletions
|
|
@ -11,7 +11,6 @@ import sys
|
|||
import re
|
||||
|
||||
from kodi_six import xbmc, xbmcvfs
|
||||
from six import text_type
|
||||
|
||||
from . import jellyfin_db
|
||||
from ..helper import translate, settings, window, dialog
|
||||
|
|
@ -362,7 +361,7 @@ def save_sync(sync):
|
|||
|
||||
with open(os.path.join(ADDON_DATA, "sync.json"), "wb") as outfile:
|
||||
data = json.dumps(sync, sort_keys=True, indent=4, ensure_ascii=False)
|
||||
if isinstance(data, text_type):
|
||||
if isinstance(data, str):
|
||||
data = data.encode("utf-8")
|
||||
outfile.write(data)
|
||||
|
||||
|
|
@ -411,7 +410,7 @@ def save_credentials(credentials):
|
|||
try:
|
||||
with open(os.path.join(ADDON_DATA, "data.json"), "wb") as outfile:
|
||||
data = json.dumps(credentials, sort_keys=True, indent=4, ensure_ascii=False)
|
||||
if isinstance(data, text_type):
|
||||
if isinstance(data, str):
|
||||
data = data.encode("utf-8")
|
||||
outfile.write(data)
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue