提交 d367cc01 编写于 作者: N nicolargo

Another try for issue#1185

上级 6260f193
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册