Replace if statement with if expression

This commit is contained in:
Brian Pepple 2020-09-27 11:24:14 -04:00 committed by Odd Stråbø
parent f5c0016914
commit 29f9956b61
2 changed files with 2 additions and 8 deletions

View file

@ -35,10 +35,7 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
def set_options(self, options=None):
if options is None:
self._options = []
else:
self._options = options
self._options = [] if options is None else options
def is_selected(self):
return bool(self.selected_option)

View file

@ -51,10 +51,7 @@ class LogHandler(logging.StreamHandler):
self.mask_info = settings('maskInfo.bool')
if kodi_version() > 18:
self.level = xbmc.LOGINFO
else:
self.level = xbmc.LOGNOTICE
self.level = xbmc.LOGINFO if kodi_version() > 18 else xbmc.LOGNOTICE
def emit(self, record):