exports: Python 3 compat

This commit is contained in:
Alessio Sergi 2015-09-20 19:20:49 +02:00
parent 8c2758a8ae
commit 40c4b7ac23

View File

@ -136,7 +136,11 @@ class GlancesExport(object):
else:
pre_key = ''
# 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):
try:
value = value[0]