mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Check for asrun() returning None
This commit is contained in:
parent
f26eb24e10
commit
5db02bba3a
@ -1032,11 +1032,13 @@ class NowPlayingSegment(object):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
spotify = asrun(pl, ascript)
|
spotify = asrun(pl, ascript)
|
||||||
|
if not asrun:
|
||||||
|
return None
|
||||||
|
|
||||||
spotify_status = spotify.split(", ")
|
spotify_status = spotify.split(", ")
|
||||||
state = self._convert_state(spotify_status[0])
|
state = self._convert_state(spotify_status[0])
|
||||||
if state == 'stop':
|
if state == 'stop':
|
||||||
return
|
return None
|
||||||
return {
|
return {
|
||||||
'state': state,
|
'state': state,
|
||||||
'state_symbol': self.STATE_SYMBOLS.get(state),
|
'state_symbol': self.STATE_SYMBOLS.get(state),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user