mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
Replace if statement with if expression
This commit is contained in:
parent
f5c0016914
commit
29f9956b61
2 changed files with 2 additions and 8 deletions
|
@ -35,10 +35,7 @@ class ContextMenu(xbmcgui.WindowXMLDialog):
|
||||||
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
def set_options(self, options=None):
|
def set_options(self, options=None):
|
||||||
if options is None:
|
self._options = [] if options is None else options
|
||||||
self._options = []
|
|
||||||
else:
|
|
||||||
self._options = options
|
|
||||||
|
|
||||||
def is_selected(self):
|
def is_selected(self):
|
||||||
return bool(self.selected_option)
|
return bool(self.selected_option)
|
||||||
|
|
|
@ -51,10 +51,7 @@ class LogHandler(logging.StreamHandler):
|
||||||
|
|
||||||
self.mask_info = settings('maskInfo.bool')
|
self.mask_info = settings('maskInfo.bool')
|
||||||
|
|
||||||
if kodi_version() > 18:
|
self.level = xbmc.LOGINFO if kodi_version() > 18 else xbmc.LOGNOTICE
|
||||||
self.level = xbmc.LOGINFO
|
|
||||||
else:
|
|
||||||
self.level = xbmc.LOGNOTICE
|
|
||||||
|
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue