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