From 9d811fd29918c41c0eea3b6787f3ffbf521f0ade Mon Sep 17 00:00:00 2001 From: Denis Kuzmenok Date: Tue, 27 Oct 2020 20:55:10 +0100 Subject: [PATCH] fixed errors from pull request. --- resources/site-packages/elementum/navigation.py | 3 +-- resources/site-packages/elementum/provider.py | 6 +++--- resources/site-packages/elementum/rpc.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/resources/site-packages/elementum/navigation.py b/resources/site-packages/elementum/navigation.py index d0616421b..a044f74c3 100644 --- a/resources/site-packages/elementum/navigation.py +++ b/resources/site-packages/elementum/navigation.py @@ -385,8 +385,7 @@ def run(url_suffix="", retry=0): for m, menu in enumerate(item["context_menu"]): if menu[0][0:8] == "LOCALIZE": menu[0] = getLocalizedLabel(menu[0]) - if PLATFORM['kodi'] >= 19 \ - and menu[1][0:5] == "XBMC.": + if PLATFORM['kodi'] >= 19 and menu[1][0:5] == "XBMC.": menu[1] = menu[1][5:] listItem.addContextMenuItems(item["context_menu"]) listItem.setProperty("isPlayable", item["is_playable"] and "true" or "false") diff --git a/resources/site-packages/elementum/provider.py b/resources/site-packages/elementum/provider.py index 85a382b8f..85f6dcbfd 100644 --- a/resources/site-packages/elementum/provider.py +++ b/resources/site-packages/elementum/provider.py @@ -102,7 +102,7 @@ def request(url, params={}, headers={}, data=None, method=None): except Exception as e: import traceback map(log.error, traceback.format_exc().split("\n")) - notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8'))) + notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8')) return None, None @@ -171,7 +171,7 @@ def register(search, search_movie, search_episode, search_season=None): except Exception as e: import traceback map(log.error, traceback.format_exc().split("\n")) - notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8'))) + notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8')) try: urllib_request.urlopen("%s/provider/%s/failure" % (ELEMENTUMD_HOST, ADDON_ID)) except: @@ -187,7 +187,7 @@ def register(search, search_movie, search_episode, search_season=None): except Exception as e: import traceback map(log.error, traceback.format_exc().split("\n")) - notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e), 'utf-8'))) + notify(py2_encode("%s: %s" % (getLocalizedString(30224), repr(e)), 'utf-8')) try: urllib_request.urlopen("%s/provider/%s/failure" % (ELEMENTUMD_HOST, ADDON_ID)) except: diff --git a/resources/site-packages/elementum/rpc.py b/resources/site-packages/elementum/rpc.py index b50f6ddfd..b791e1237 100644 --- a/resources/site-packages/elementum/rpc.py +++ b/resources/site-packages/elementum/rpc.py @@ -412,7 +412,7 @@ def DialogProgress_Create(self, *args, **kwargs): def DialogProgress_IsCanceled(self, hwnd, *args, **kwargs): if PLATFORM['kodi'] < 19: - return int(self._objects[hwnd].iscanceled( *args, **kwargs)) + return int(self._objects[hwnd].iscanceled(*args, **kwargs)) else: heading, message = makeMessage(*args, **kwargs) return int(self._objects[hwnd].iscanceled(heading, message))