Skip to content

Commit

Permalink
on mountpoints with non-breaking spaces #1128
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Jul 27, 2017
1 parent ca563ca commit 00531b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Bugs corrected:
* PermissionError on macOS (issue #1120)
* Cant move up or down in glances --browser (issue #1113)
* Unable to give aliases to or hide network interfaces and disks (issue #1126)
* `UnicodeDecodeError` on mountpoints with non-breaking spaces (issue #1128)

Installation:

Expand Down
3 changes: 2 additions & 1 deletion glances/plugins/glances_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import operator

from glances.compat import u
from glances.plugins.glances_plugin import GlancesPlugin

import psutil
Expand Down Expand Up @@ -132,7 +133,7 @@ def update(self):
'device_name': fs.device,
'fs_type': fs.fstype,
# Manage non breaking space (see issue #1065)
'mnt_point': fs.mountpoint.replace(u'\u00A0', ' '),
'mnt_point': u(fs.mountpoint).replace(u'\u00A0', ' '),
'size': fs_usage.total,
'used': fs_usage.used,
'free': fs_usage.free,
Expand Down

0 comments on commit 00531b5

Please sign in to comment.