Screens/About.py: Calculate correct value for "Free" memory, avoid crash
authorMike Looijmans <milo@openpli.org>
Wed, 30 Dec 2015 14:03:22 +0000 (15:03 +0100)
committerMike Looijmans <milo@openpli.org>
Wed, 30 Dec 2015 14:26:33 +0000 (15:26 +0100)
commitee13209efaf5935d969b72cbed052dfcf6270b77
tree95d5d5dbe8940315767440055b50e22301babcb6
parentce2cd998880f0ddf1df6c340bced7914e74539c9
Screens/About.py: Calculate correct value for "Free" memory, avoid crash

Lines in /proc/meminfo may not always have 3 entries (e.g. huge pages) handle
this gracefully instead of crashing.

Use "enumerate" instead of handcrafting a counter.

Use simpler string match (startswith instead of "in").

Consider "Cached" and "Buffers" as free memory too.
lib/python/Screens/About.py