From d3baaaa6c4dc981eb757195d47aac00eeb46ee8b Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Thu, 13 Dec 2012 13:53:35 +0100 Subject: [PATCH] Correct the issue #136 --- glances/glances.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/glances/glances.py b/glances/glances.py index 1e998a74..0053c705 100755 --- a/glances/glances.py +++ b/glances/glances.py @@ -490,7 +490,7 @@ class GlancesGrabProcesses: try: procstat['username'] = proc.username except psutil.AccessDenied, err: - procstat['username'] = "" + procstat['username'] = "?" pass if hasattr(proc, 'get_nice'): @@ -698,12 +698,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', 0) + cached = getattr(phymem, 'cached', 0) # active and inactive not available on Windows - active = getattr(phymem, 'active', lambda: 0) - inactive = getattr(phymem, 'inactive', lambda: 0) + active = getattr(phymem, 'active', 0) + inactive = getattr(phymem, 'inactive', 0) # phymem free and usage total = phymem.total