Two line if
This commit is contained in:
parent
612b8b07eb
commit
0743767385
@ -100,7 +100,8 @@ class Cmus(IntervalModule):
|
|||||||
"color": self.color}
|
"color": self.color}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if hasattr(self, "data"): del self.data
|
if hasattr(self, "data"):
|
||||||
|
del.data
|
||||||
self.output = {"full_text": self.format_not_running,
|
self.output = {"full_text": self.format_not_running,
|
||||||
"color": self.color_not_running}
|
"color": self.color_not_running}
|
||||||
|
|
||||||
|
@ -91,7 +91,8 @@ class MPD(IntervalModule):
|
|||||||
self.output = {
|
self.output = {
|
||||||
"full_text": ""
|
"full_text": ""
|
||||||
}
|
}
|
||||||
if hasattr(self, "data"): del self.data
|
if hasattr(self, "data"):
|
||||||
|
del.data
|
||||||
return
|
return
|
||||||
|
|
||||||
fdict = {
|
fdict = {
|
||||||
|
@ -127,7 +127,8 @@ class NowPlaying(IntervalModule):
|
|||||||
"full_text": self.format_no_player,
|
"full_text": self.format_no_player,
|
||||||
"color": self.color_no_player,
|
"color": self.color_no_player,
|
||||||
}
|
}
|
||||||
if hasattr(self, "data"): del self.data
|
if hasattr(self, "data"): if hasattr(self, "data"):
|
||||||
|
del.data
|
||||||
return
|
return
|
||||||
|
|
||||||
except dbus.exceptions.DBusException as e:
|
except dbus.exceptions.DBusException as e:
|
||||||
@ -138,7 +139,8 @@ class NowPlaying(IntervalModule):
|
|||||||
"full_text": "DBus error: " + e.get_dbus_message(),
|
"full_text": "DBus error: " + e.get_dbus_message(),
|
||||||
"color": "#ff0000",
|
"color": "#ff0000",
|
||||||
}
|
}
|
||||||
if hasattr(self, "data"): del self.data
|
if hasattr(self, "data"):
|
||||||
|
del.data
|
||||||
return
|
return
|
||||||
|
|
||||||
def playpause(self):
|
def playpause(self):
|
||||||
|
@ -95,7 +95,8 @@ class Spotify(IntervalModule):
|
|||||||
except:
|
except:
|
||||||
self.output = {"full_text": self.format_not_running,
|
self.output = {"full_text": self.format_not_running,
|
||||||
"color": self.color_not_running}
|
"color": self.color_not_running}
|
||||||
if hasattr(self, "data"): del self.data
|
if hasattr(self, "data"):
|
||||||
|
del.data
|
||||||
|
|
||||||
def playpause(self):
|
def playpause(self):
|
||||||
"""Pauses and plays spotify"""
|
"""Pauses and plays spotify"""
|
||||||
|
Loading…
Reference in New Issue
Block a user