mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 20:21:35 +03:00
Fix psutilversion plugin (#815)
The psutil_version instance variable was erroneously declared as private (using name mangling).
This commit is contained in:
parent
bceb7cfc54
commit
84e8759a8d
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user