From 9b82e736a00b4743c1149da67c0fe7eddd78f484 Mon Sep 17 00:00:00 2001 From: Joe Finney Date: Sun, 25 Oct 2020 17:29:00 -0700 Subject: [PATCH] Fix arch-updates off-by-one. There's a newline in the output so this overcounts by one. --- bumblebee_status/modules/contrib/arch-update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee_status/modules/contrib/arch-update.py b/bumblebee_status/modules/contrib/arch-update.py index c93545b..ed9ae58 100644 --- a/bumblebee_status/modules/contrib/arch-update.py +++ b/bumblebee_status/modules/contrib/arch-update.py @@ -40,7 +40,7 @@ class Module(core.module.Module): ) if code == 0: - self.__packages = len(result.split("\n")) + self.__packages = len(result.strip().split("\n")) elif code == 2: self.__packages = 0 else: