提交 1e42fe4f 编写于 作者: N nicolargo

Drive name with special characters causes crash #1383

上级 1ddb9e9c
......@@ -28,6 +28,7 @@ Bugs corrected:
* Standard output misbehaviour (need to flush) #1376
* Create an option to set the username to use in Web or RPC Server mode #1381
* Missing kernel task names when the webui is switched to long process names #1371
* Drive name with special characters causes crash #1383
Others:
......
......@@ -28,7 +28,7 @@ import json
import copy
from operator import itemgetter
from glances.compat import iterkeys, itervalues, listkeys, map, mean
from glances.compat import iterkeys, itervalues, listkeys, map, mean, nativestr
from glances.actions import GlancesActions
from glances.history import GlancesHistory
from glances.logger import logger
......@@ -182,14 +182,14 @@ class GlancesPlugin(object):
# interface)
for l in self.get_export():
self.stats_history.add(
str(l[item_name]) + '_' + i['name'],
nativestr(l[item_name]) + '_' + nativestr(i['name']),
l[i['name']],
description=i['description'],
history_max_size=self._limits['history_size'])
else:
# Stats is not a list
# Add the item to the history directly
self.stats_history.add(i['name'],
self.stats_history.add(nativestr(i['name']),
self.get_export()[i['name']],
description=i['description'],
history_max_size=self._limits['history_size'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册