From ae1274d5d31298c5e80719dd6e38512ff78a49f4 Mon Sep 17 00:00:00 2001 From: ncoop Date: Sat, 4 Jun 2016 21:30:24 -0700 Subject: [PATCH] Makes update count algo less wrong. --- i3pystatus/updates/dnf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/updates/dnf.py b/i3pystatus/updates/dnf.py index 31125a4..8ea8a77 100644 --- a/i3pystatus/updates/dnf.py +++ b/i3pystatus/updates/dnf.py @@ -24,7 +24,7 @@ class Dnf(Backend): update_count = 0 if dnf.rc == 100: lines = raw.splitlines()[2:] - lines = [l for l in lines if len(split("\s{2,}", l.rstrip())) == 3] + lines = [l for l in lines if len(split("\s+", l.rstrip())) == 3] update_count = len(lines) notif_body = sub(r"(\S+)\s+(\S+)\s+\S+\s*\n", r"\1: \2\n", raw) return update_count, notif_body