Merge pull request #1084 from croneter/fix-importerror

Fix PKC not starting up on iOS
This commit is contained in:
croneter 2019-12-13 16:53:44 +01:00 committed by GitHub
commit d84b7ccbe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,14 @@ elif xbmc.getCondVisibility('system.platform.android'):
else:
DEVICE = "Unknown"
MODEL = platform.release() or 'Unknown'
try:
MODEL = platform.release() or 'Unknown'
except IOError:
# E.g. iOS
# It seems that Kodi doesn't allow python to spawn subprocesses in order to
# determine the system name
# See https://github.com/psf/requests/issues/4434
MODEL = 'Unknown'
DEVICENAME = try_decode(_ADDON.getSetting('deviceName'))
if not DEVICENAME: