From 4964abeed129e5006a524172d5b38e77771376a1 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Thu, 6 Dec 2012 16:46:26 -0800 Subject: [PATCH] glances: fix crasher you need to call the function otherwise you will try running float() on a function later when you try displaying it Introduced in eda1cf5ba750ed82700b018b799db2ca31693870 --- glances/glances.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glances/glances.py b/glances/glances.py index 209d65cf..01bb59c8 100755 --- a/glances/glances.py +++ b/glances/glances.py @@ -728,12 +728,12 @@ class GlancesStats: phymem = psutil.virtual_memory() # buffers and cached (Linux, BSD) - buffers = getattr(phymem, 'buffers', lambda: 0) - cached = getattr(phymem, 'cached', lambda: 0) + buffers = getattr(phymem, 'buffers', lambda: 0)() + cached = getattr(phymem, 'cached', lambda: 0)() # active and inactive not available on Windows - active = getattr(phymem, 'active', lambda: 0) - inactive = getattr(phymem, 'inactive', lambda: 0) + active = getattr(phymem, 'active', lambda: 0)() + inactive = getattr(phymem, 'inactive', lambda: 0)() # phymem free and usage total = phymem.total