Meminfo - new column after 25 rows, cosmetic
authorims <ims21@users.sourceforge.net>
Fri, 19 Dec 2014 08:34:14 +0000 (09:34 +0100)
committerlittlesat <Guido.Reijntjens@Medtronic.com>
Fri, 19 Dec 2014 09:33:45 +0000 (10:33 +0100)
Signed-off-by: littlesat <Guido.Reijntjens@Medtronic.com>

lib/python/Screens/About.py

index 88d1042..e867f91 100644 (file)
@@ -242,16 +242,16 @@ class MemoryInfo(Screen):
                try:
                        ltext = rtext = ""
                        lvalue = rvalue = ""
-                       mem = 0
+                       mem = 1
                        free = 0
                        i = 0
                        for line in open('/proc/meminfo','r'):
                                ( name, size, units ) = line.strip().split()
-                               if name.find("MemTotal") != -1:
+                               if "MemTotal" in name:
                                        mem = int(size)
-                               if name.find("MemFree") != -1:
+                               if "MemFree" in name:
                                        free = int(size)
-                               if i < 28:
+                               if i < 25:
                                        ltext += "".join((name,"\n"))
                                        lvalue += "".join((size," ",units,"\n"))
                                else: