alcuni fix per kodi 19

This commit is contained in:
marco
2020-08-16 12:55:12 +02:00
parent ae2a9d7c72
commit bfb80f6889
42 changed files with 6510 additions and 2735 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ from __future__ import unicode_literals
from collections import namedtuple
from functools import partial
# from pkg_resources import resource_stream # @UnresolvedImport
import os
import os, io
from .converters import ConverterManager
from . import basestr
@@ -19,10 +19,10 @@ COUNTRY_MATRIX = []
#: The namedtuple used in the :data:`COUNTRY_MATRIX`
IsoCountry = namedtuple('IsoCountry', ['name', 'alpha2'])
f = open(os.path.join(os.path.dirname(__file__), 'data/iso-3166-1.txt'))
f = io.open(os.path.join(os.path.dirname(__file__), 'data/iso-3166-1.txt'), encoding='utf-8')
f.readline()
for l in f:
iso_country = IsoCountry(*l.decode('utf-8').strip().split(';'))
iso_country = IsoCountry(*l.strip().split(';'))
COUNTRIES[iso_country.alpha2] = iso_country.name
COUNTRY_MATRIX.append(iso_country)
f.close()