Merge pull request #4573 from heitbaum/patch-1

Docker:  Update default.py to fix Python BPO - syntax warning for "is" with a literal
This commit is contained in:
mglae 2020-10-30 19:39:17 +01:00 committed by GitHub
commit cf5a7105d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,6 @@
129
- Fix "docker run --init"
128
- Update to docker 19.03.2

View File

@ -5,7 +5,7 @@
PKG_NAME="docker"
PKG_VERSION="19.03.2"
PKG_SHA256="46b52f92cb258e038e3f29624e75a52e4d2f91502f56edeac0f0b2661b3b9c3d"
PKG_REV="128"
PKG_REV="129"
PKG_ARCH="any"
PKG_LICENSE="ASL"
PKG_SITE="http://www.docker.com/"

View File

@ -185,7 +185,7 @@ docker_events = {
def print_notification(json_data):
event_string = docker_events[json_data['Type']]['event'][json_data['Action']]['string']
if __addon__.getSetting('notifications') is '0': # default
if __addon__.getSetting('notifications') == '0': # default
if docker_events[json_data['Type']]['event'][json_data['Action']]['enabled']:
try:
message = ' '.join([__addon__.getLocalizedString(30010),
@ -200,7 +200,7 @@ def print_notification(json_data):
__addon__.getLocalizedString(30012),
__addon__.getLocalizedString(event_string)])
elif __addon__.getSetting('notifications') is '1': # all
elif __addon__.getSetting('notifications') == '1': # all
try:
message = ' '.join([__addon__.getLocalizedString(30010),
json_data['Actor']['Attributes']['name'],
@ -214,10 +214,10 @@ def print_notification(json_data):
__addon__.getLocalizedString(30012),
__addon__.getLocalizedString(event_string)])
elif __addon__.getSetting('notifications') is '2': # none
elif __addon__.getSetting('notifications') == '2': # none
pass
elif __addon__.getSetting('notifications') is '3': # custom
elif __addon__.getSetting('notifications') == '3': # custom
if __addon__.getSetting(json_data['Action']) == 'true':
try:
message = ' '.join([__addon__.getLocalizedString(30010),
@ -234,7 +234,7 @@ def print_notification(json_data):
dialog = xbmcgui.Dialog()
try:
if message is not '':
if message != '':
length = int(__addon__.getSetting('notification_length')) * 1000
dialog.notification('Docker', message, '/storage/.kodi/addons/service.system.docker/resources/icon.png', length)
xbmc.log('## service.system.docker ## %s' % message)