From 4542db556fa2a2ed01cad0ab0775498643d2750d Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Tue, 2 Oct 2012 09:17:47 +0200 Subject: [PATCH] version 1.4.2.1 --- NEWS | 5 +++++ glances/glances.py | 8 ++++++-- man/glances.1 | 2 +- setup.py | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 963bea71..fb7f374f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Version 1.4.2.1 +=============== + + * Minor patch to solve memomy issue (#94) on Mac OS X + Version 1.4.2 ============= diff --git a/glances/glances.py b/glances/glances.py index 2230ce8a..862c3adf 100755 --- a/glances/glances.py +++ b/glances/glances.py @@ -20,7 +20,7 @@ # __appname__ = 'glances' -__version__ = "1.4.2" +__version__ = "1.4.2.1" __author__ = "Nicolas Hennion " __licence__ = "LGPL" @@ -603,7 +603,11 @@ class glancesStats: if psutil_mem_vm: # If PsUtil 0.6+ phymem = psutil.virtual_memory() - self.mem = {'cache': phymem.cached + phymem.buffers, + if (hasattr(phymem, 'cached') and hasattr(phymem, 'buffers')): + cachemem = phymem.cached + phymem.buffers + else: + cachemem = 0 + self.mem = {'cache': cachemem, 'total': phymem.total, 'used': phymem.used, 'free': phymem.free, diff --git a/man/glances.1 b/man/glances.1 index 02bddbe4..19911f4d 100644 --- a/man/glances.1 +++ b/man/glances.1 @@ -1,4 +1,4 @@ -.TH glances 1 "September, 2012" "version 1.4.2" "USER COMMANDS" +.TH glances 1 "October, 2012" "version 1.4.2.1" "USER COMMANDS" .SH NAME glances \- CLI curses based monitoring tool .SH SYNOPSIS diff --git a/setup.py b/setup.py index a2d9fb08..37048e84 100755 --- a/setup.py +++ b/setup.py @@ -23,8 +23,8 @@ for mo in glob('i18n/*/LC_MESSAGES/*.mo'): data_files.append((dirname(mo).replace('i18n/', 'share/locale/'), [mo])) setup(name='Glances', - version='1.4.2', - download_url='https://github.com/downloads/nicolargo/glances/glances-1.4.2.tar.gz', + version='1.4.2.1', + download_url='https://github.com/downloads/nicolargo/glances/glances-1.4.2.1.tar.gz', url='https://github.com/nicolargo/glances', description='CLI curses-based monitoring tool', author='Nicolas Hennion',