From d24f001da610391a6a5e3501bbe1612137c63576 Mon Sep 17 00:00:00 2001 From: lukeroge Date: Mon, 2 Apr 2012 09:29:42 +1200 Subject: [PATCH] moved float() --- plugins/system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/system.py b/plugins/system.py index a01acd6..00389a5 100755 --- a/plugins/system.py +++ b/plugins/system.py @@ -29,8 +29,8 @@ def memory(inp): s = dict(re.findall(r'^(\w+):\s*(.*)\s*$', status_file, re.M)) # get the data we need and process it data = s['VmRSS'], s['VmSize'], s['VmPeak'], s['VmStk'], s['VmData'] - data = [int(i.replace(' kB', '')) for i in data] - strings = [str(round(float(i) / 1024, 2)) + ' MB' for i in data] + data = [float(i.replace(' kB', '')) for i in data] + strings = [str(round(i / 1024, 2)) + ' MB' for i in data] # prepare the output out = "Real Memory: \x02%s\x02, Allocated Memory: \x02%s\x02, Peak " \ "Allocated Memory: \x02%s\x02, Stack Size: \x02%s\x02, Heap " \