提交 84e8759a 编写于 作者: A Alessio Sergi

Fix psutilversion plugin (#815)

The psutil_version instance variable was erroneously declared as private
(using name mangling).
上级 bceb7cfc
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册