mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-07-03 05:17:55 +00:00
Remove six: string coercion
This commit is contained in:
parent
0e5c5e4c07
commit
57ed8bdedd
8 changed files with 17 additions and 34 deletions
|
@ -7,11 +7,10 @@ import os
|
|||
import logging
|
||||
import traceback
|
||||
|
||||
from six import ensure_text
|
||||
from kodi_six import xbmc, xbmcaddon
|
||||
|
||||
from .. import database
|
||||
from . import get_filesystem_encoding, settings, kodi_version
|
||||
from . import settings, kodi_version
|
||||
from .utils import translate_path
|
||||
|
||||
##################################################################################################
|
||||
|
@ -92,9 +91,6 @@ class MyFormatter(logging.Formatter):
|
|||
logging.Formatter.__init__(self, fmt)
|
||||
|
||||
def format(self, record):
|
||||
if record.pathname:
|
||||
record.pathname = ensure_text(record.pathname, get_filesystem_encoding())
|
||||
|
||||
self._gen_rel_path(record)
|
||||
|
||||
# Call the original formatter class to do the grunt work
|
||||
|
@ -107,8 +103,6 @@ class MyFormatter(logging.Formatter):
|
|||
res = []
|
||||
|
||||
for o in traceback.format_exception(*exc_info):
|
||||
o = ensure_text(o, get_filesystem_encoding())
|
||||
|
||||
if o.startswith(' File "'):
|
||||
# If this split can't handle your file names, you should seriously consider renaming your files.
|
||||
fn = o.split(' File "', 2)[1].split('", line ', 1)[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue