Fixes for Kodi 18.5 (and Python2)

This commit is contained in:
Odd Stråbø 2020-01-04 05:17:51 +01:00
parent a51bf9c2cc
commit 933a31ac23
6 changed files with 13 additions and 9 deletions

View file

@ -263,7 +263,7 @@ def values(item, keys):
''' Grab the values in the item for a list of keys {key},{key1}....
If the key has no brackets, the key will be passed as is.
'''
return (item[key.replace('{', "").replace('}', "")] if type(key) == str and key.startswith('{') else key for key in keys)
return (item[key.replace('{', "").replace('}', "")] if isinstance(key, text_type) and key.startswith('{') else key for key in keys)
def indent(elem, level=0):