Fix psutilversion plugin (#815)

The psutil_version instance variable was erroneously declared as private
(using name mangling).
This commit is contained in:
Alessio Sergi 2016-03-23 11:23:56 +01:00
parent bceb7cfc54
commit 84e8759a8d

View File

@ -17,13 +17,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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: