From 000f5d5abb4095afa0f82f941dd631d2d7979b88 Mon Sep 17 00:00:00 2001 From: Laurie Clark-Michalek Date: Wed, 1 Sep 2010 20:07:23 +0100 Subject: Fixed mpdDisplay with shell method --- archey3 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'archey3') diff --git a/archey3 b/archey3 index 129c88c..54b45b9 100755 --- a/archey3 +++ b/archey3 @@ -346,9 +346,9 @@ class mpdDisplay(display): try: return '{statname} in MPD database'.format(statname=self.stat.title()), self.proccess.stats()[self.stat] except Exception: - return None + return False else: - super().render() + return super().render() def format_output(self, instring): lines = instring.split('\n') @@ -359,7 +359,7 @@ class mpdDisplay(display): stats['songs'] = lines[2].split(':')[1].strip() #if people don't have mpc installed (= no mpd installed) then return None) except ValueError: - return None + return False return '{statname} in MPD database'.format(statname=self.stat.title()), stats[self.stat] @@ -418,7 +418,7 @@ class Archey(object): if isinstance(out, list): for o in out: outputs.append(o) - elif out is not None: + elif out: outputs.append(out) else: continue -- cgit v1.2.3-54-g00ecf