mirror of https://github.com/nicolargo/glances
Another try for issue#1185
parent
6260f193cd
commit
d367cc012b
|
@ -92,7 +92,7 @@ if PY3:
|
|||
def b(s):
|
||||
if isinstance(s, binary_type):
|
||||
return s
|
||||
return s.encode('latin-1')
|
||||
return s.encode('utf-8')
|
||||
|
||||
def nativestr(s):
|
||||
if isinstance(s, text_type):
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import operator
|
||||
|
||||
from glances.compat import u
|
||||
from glances.compat import b
|
||||
from glances.logger import logger
|
||||
from glances.plugins.glances_plugin import GlancesPlugin
|
||||
|
||||
|
@ -195,7 +195,7 @@ class Plugin(GlancesPlugin):
|
|||
if len(hotspotname) > ifname_max_width:
|
||||
hotspotname = '_' + hotspotname[-ifname_max_width + 1:]
|
||||
# Add the new hotspot to the message
|
||||
msg = '{:{width}}'.format(u(hotspotname),
|
||||
msg = '{:{width}}'.format(b(hotspotname),
|
||||
width=ifname_max_width)
|
||||
ret.append(self.curse_add_line(msg))
|
||||
msg = '{:>7}'.format(i['signal'], width=ifname_max_width)
|
||||
|
|
Loading…
Reference in New Issue