mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 05:42:57 +03:00
500 Internal Server Error /api/3/network/interface_name #1401
This commit is contained in:
parent
c35a7dacfc
commit
91a96edd58
4
NEWS
4
NEWS
@ -12,7 +12,9 @@ Enhancements and new features:
|
||||
|
||||
Bugs corrected:
|
||||
|
||||
* ...
|
||||
* Fix Cassandra table name export #1402
|
||||
* Permission denied: '/etc/glances/glances.conf' #1403
|
||||
* 500 Internal Server Error /api/3/network/interface_name #1401
|
||||
|
||||
Others:
|
||||
|
||||
|
@ -390,7 +390,8 @@ class GlancesPlugin(object):
|
||||
try:
|
||||
# Source:
|
||||
# http://stackoverflow.com/questions/4573875/python-get-index-of-dictionary-item-in-list
|
||||
return self._json_dumps({item: map(itemgetter(item), self.stats)})
|
||||
# But https://github.com/nicolargo/glances/issues/1401
|
||||
return self._json_dumps({item: list(map(itemgetter(item), self.stats))})
|
||||
except (KeyError, ValueError) as e:
|
||||
logger.error("Cannot get item {} ({})".format(item, e))
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user