From 84e8759a8deae2060fc8731d7f11f03a32485985 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Wed, 23 Mar 2016 11:23:56 +0100 Subject: [PATCH] Fix psutilversion plugin (#815) The psutil_version instance variable was erroneously declared as private (using name mangling). --- glances/plugins/glances_psutilversion.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/glances/plugins/glances_psutilversion.py b/glances/plugins/glances_psutilversion.py index 9b1132ae..11a648f5 100644 --- a/glances/plugins/glances_psutilversion.py +++ b/glances/plugins/glances_psutilversion.py @@ -17,13 +17,11 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +from glances.globals import psutil_version from glances.plugins.glances_plugin import GlancesPlugin -from psutil import __version__ as __psutil_version - class Plugin(GlancesPlugin): - """Get the psutil version for client/server purposes. stats is a tuple @@ -48,7 +46,7 @@ class Plugin(GlancesPlugin): if self.input_method == 'local': # PsUtil version only available in local try: - self.stats = tuple([int(num) for num in __psutil_version.split('.')]) + self.stats = tuple([int(num) for num in psutil_version.split('.')]) except NameError: pass else: