From dec534ce819544c4efa601364cfce69878fb823c Mon Sep 17 00:00:00 2001 From: enkore Date: Wed, 27 Jan 2016 20:02:51 +0100 Subject: [PATCH] Fix errorneous recursive replace mishap --- i3pystatus/cmus.py | 2 +- i3pystatus/core/util.py | 2 +- i3pystatus/mpd.py | 2 +- i3pystatus/now_playing.py | 6 +++--- i3pystatus/spotify.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/i3pystatus/cmus.py b/i3pystatus/cmus.py index 6694ab3..25f6d6a 100644 --- a/i3pystatus/cmus.py +++ b/i3pystatus/cmus.py @@ -101,7 +101,7 @@ class Cmus(IntervalModule): else: if hasattr(self, "data"): - del.data + del self.data self.output = {"full_text": self.format_not_running, "color": self.color_not_running} diff --git a/i3pystatus/core/util.py b/i3pystatus/core/util.py index 4de7671..c5169f4 100644 --- a/i3pystatus/core/util.py +++ b/i3pystatus/core/util.py @@ -112,7 +112,7 @@ class KeyConstraintDict(collections.UserDict): def __delitem__(self, key): self.seen_keys.remove(key) - if hasattr(self, "data"): del self.data[key] + del self.data[key] def __iter__(self): """Iteration will raise a MissingKeys exception unless all required keys are set diff --git a/i3pystatus/mpd.py b/i3pystatus/mpd.py index 97e10a9..1aed61a 100644 --- a/i3pystatus/mpd.py +++ b/i3pystatus/mpd.py @@ -92,7 +92,7 @@ class MPD(IntervalModule): "full_text": "" } if hasattr(self, "data"): - del.data + del self.data return fdict = { diff --git a/i3pystatus/now_playing.py b/i3pystatus/now_playing.py index 0eb8c72..f3f8d64 100644 --- a/i3pystatus/now_playing.py +++ b/i3pystatus/now_playing.py @@ -127,8 +127,8 @@ class NowPlaying(IntervalModule): "full_text": self.format_no_player, "color": self.color_no_player, } - if hasattr(self, "data"): if hasattr(self, "data"): - del.data + if hasattr(self, "data"): + del self.data return except dbus.exceptions.DBusException as e: @@ -140,7 +140,7 @@ class NowPlaying(IntervalModule): "color": "#ff0000", } if hasattr(self, "data"): - del.data + del self.data return def playpause(self): diff --git a/i3pystatus/spotify.py b/i3pystatus/spotify.py index 1828da9..54e92c3 100644 --- a/i3pystatus/spotify.py +++ b/i3pystatus/spotify.py @@ -96,7 +96,7 @@ class Spotify(IntervalModule): self.output = {"full_text": self.format_not_running, "color": self.color_not_running} if hasattr(self, "data"): - del.data + del self.data def playpause(self): """Pauses and plays spotify"""