Merge pull request #458 from udono/master

Use len() for lists instead of count() for #447
This commit is contained in:
facetoe 2016-09-29 19:12:16 +08:00 committed by GitHub
commit 55b1c1432c

View File

@ -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