mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-26 10:42:29 +03:00
Glances crashes when mountpoint with non ASCII characters esists #1201
This commit is contained in:
parent
1bc7450e90
commit
856652a5c8
1
NEWS
1
NEWS
@ -40,6 +40,7 @@ Bugs corrected:
|
||||
* Another encoding issue... With both Python 2 and Python 3 #1197
|
||||
* Glances do not exit when eating 'q' #1207
|
||||
* FreeBSD blackhole bug #1202
|
||||
* Glances crashes when mountpoint with non ASCII characters exists #1201
|
||||
|
||||
Backward-incompatible changes:
|
||||
|
||||
|
@ -19,8 +19,7 @@
|
||||
|
||||
"""Disk I/O plugin."""
|
||||
|
||||
import re
|
||||
|
||||
from glances.compat import b
|
||||
from glances.timer import getTimeSinceLastUpdate
|
||||
from glances.plugins.glances_plugin import GlancesPlugin
|
||||
|
||||
@ -191,7 +190,8 @@ class Plugin(GlancesPlugin):
|
||||
if len(disk_name) > name_max_width:
|
||||
# Cut disk name if it is too long
|
||||
disk_name = '_' + disk_name[-name_max_width:]
|
||||
msg = '{:{width}}'.format(disk_name, width=name_max_width)
|
||||
msg = '{:{width}}'.format(b(disk_name),
|
||||
width=name_max_width)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
if args.diskio_iops:
|
||||
# count
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
import numbers
|
||||
|
||||
from glances.compat import b
|
||||
from glances.folder_list import FolderList as glancesFolderList
|
||||
from glances.plugins.glances_plugin import GlancesPlugin
|
||||
|
||||
@ -115,7 +116,7 @@ class Plugin(GlancesPlugin):
|
||||
path = '_' + i['path'][-name_max_width + 1:]
|
||||
else:
|
||||
path = i['path']
|
||||
msg = '{:{width}}'.format(path,
|
||||
msg = '{:{width}}'.format(b(path),
|
||||
width=name_max_width)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
try:
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
import operator
|
||||
|
||||
from glances.compat import u
|
||||
from glances.compat import u, b
|
||||
from glances.plugins.glances_plugin import GlancesPlugin
|
||||
|
||||
import psutil
|
||||
@ -230,7 +230,8 @@ class Plugin(GlancesPlugin):
|
||||
mnt_point = '_' + i['mnt_point'][-name_max_width + 1:]
|
||||
else:
|
||||
mnt_point = i['mnt_point']
|
||||
msg = '{:{width}}'.format(mnt_point, width=name_max_width)
|
||||
msg = '{:{width}}'.format(b(mnt_point),
|
||||
width=name_max_width)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
if args.fs_free_space:
|
||||
msg = '{:>7}'.format(self.auto_unit(i['free']))
|
||||
|
Loading…
Reference in New Issue
Block a user