From 50992270277b45ba1cfb756f6b799dc892481eb2 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Wed, 28 Sep 2016 22:30:19 +0200 Subject: [PATCH] Use len() for lists instead of count() for #447 --- i3pystatus/updates/aptget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i3pystatus/updates/aptget.py b/i3pystatus/updates/aptget.py index 432f520..936d265 100644 --- a/i3pystatus/updates/aptget.py +++ b/i3pystatus/updates/aptget.py @@ -24,8 +24,8 @@ class AptGet(Backend): apt = run_through_shell(command.split()) out = apt.out.splitlines() - out = [line[5:] for line in apt.out if line.startswith("Inst ")] - return out.count("\n"), out + out = [line[5:] for line in out if line.startswith("Inst ")] + return len(out), out Backend = AptGet