Skip to content

Commit

Permalink
Merge pull request #155 from clement-dufour/fix-shell-handler
Browse files Browse the repository at this point in the history
Fix apt shell handler raising exception and skipping update.
  • Loading branch information
anxdpanic authored Apr 5, 2024
2 parents 210dbb1 + 801d857 commit eaeec08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion resources/lib/version_check/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,16 @@ def upgrade_message(msg):
wait_for_end_of_video()

if ADDON.getSetting('lastnotified_version') < ADDON_VERSION:
xbmcgui.Dialog().ok(
answer = xbmcgui.Dialog().ok(
ADDON_NAME,
'[CR]'.join([localise(msg), localise(32001), localise(32002)])
)
else:
answer = False
log('Already notified one time for upgrading.')

return answer


def upgrade_message2(version_installed, version_available, version_stable, old_version):
""" Prompt user with upgrade suggestion message
Expand Down
2 changes: 1 addition & 1 deletion resources/lib/version_check/shell_handler_apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _check_versions(self, package):
return False, False

try:
result = check_output([_cmd], shell=True).split('\n')
result = check_output([_cmd], shell=True).decode('utf-8').split('\n')
except Exception as error: # pylint: disable=broad-except
log('ShellHandlerApt: exception while executing shell command %s: %s' % (_cmd, error))
return False, False
Expand Down

0 comments on commit eaeec08

Please sign in to comment.