From 48775e4b871caa51154ed326af267459c531c6ab Mon Sep 17 00:00:00 2001 From: Simon Struck Date: Mon, 6 Dec 2021 17:11:50 +0100 Subject: [PATCH] Fix "NowPlaying: KeyError: None" (#784) --- i3pystatus/now_playing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i3pystatus/now_playing.py b/i3pystatus/now_playing.py index ee0ec7c..b84b8af 100644 --- a/i3pystatus/now_playing.py +++ b/i3pystatus/now_playing.py @@ -194,6 +194,10 @@ https://specifications.freedesktop.org/mpris-spec/latest/Player_Interface.html if hasattr(self, "data"): del self.data return + except KeyError: + if self.hide_no_player: + self.output = None + return def playpause(self): self.player_command('PlayPause')