mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-29 15:32:25 +03:00
exports: Python 3 compat
This commit is contained in:
parent
8c2758a8ae
commit
40c4b7ac23
@ -136,7 +136,11 @@ class GlancesExport(object):
|
|||||||
else:
|
else:
|
||||||
pre_key = ''
|
pre_key = ''
|
||||||
# Walk through the dict
|
# Walk through the dict
|
||||||
for key, value in stats.iteritems():
|
try:
|
||||||
|
iteritems = stats.iteritems()
|
||||||
|
except AttributeError:
|
||||||
|
iteritems = stats.items()
|
||||||
|
for key, value in iteritems:
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
try:
|
try:
|
||||||
value = value[0]
|
value = value[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user