mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 14:12:21 +03:00
Solve some encoding issue
This commit is contained in:
parent
3cc7174dc9
commit
b016d508f0
@ -21,7 +21,7 @@
|
||||
|
||||
import os
|
||||
|
||||
from glances.compat import range
|
||||
from glances.compat import range, nativestr
|
||||
from glances.logger import logger
|
||||
|
||||
# Use the built-in version of scandir/walk if possible, otherwise
|
||||
@ -84,6 +84,8 @@ class FolderList(object):
|
||||
value['path'] = self.config.get_value(section, key + 'path')
|
||||
if value['path'] is None:
|
||||
continue
|
||||
else:
|
||||
value['path'] = nativestr(value['path'])
|
||||
|
||||
# Optional conf keys
|
||||
for i in ['careful', 'warning', 'critical']:
|
||||
|
@ -23,7 +23,7 @@ import os
|
||||
import threading
|
||||
import time
|
||||
|
||||
from glances.compat import iterkeys, itervalues
|
||||
from glances.compat import iterkeys, itervalues, nativestr
|
||||
from glances.logger import logger
|
||||
from glances.timer import getTimeSinceLastUpdate
|
||||
from glances.plugins.glances_plugin import GlancesPlugin
|
||||
@ -204,9 +204,9 @@ class Plugin(GlancesPlugin):
|
||||
# The key is the container name and not the Id
|
||||
container_stats['key'] = self.get_key()
|
||||
# Export name (first name in the Names list, without the /)
|
||||
container_stats['name'] = container.name
|
||||
container_stats['name'] = nativestr(container.name)
|
||||
# Export global Names (used by the WebUI)
|
||||
container_stats['Names'] = [container.name]
|
||||
container_stats['Names'] = [ nativestr(container.name)]
|
||||
# Container Id
|
||||
container_stats['Id'] = container.id
|
||||
# Container Image
|
||||
|
Loading…
Reference in New Issue
Block a user