glances_plugin.py has a problem with specific docker output #1160

This commit is contained in:
nicolargo 2017-10-12 09:37:16 +02:00
parent 1e2abf713a
commit bec52c9722
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -12,6 +12,7 @@ Enhancements and new features:
Bugs corrected:
* Failed to connect to bus: No such file or directory #1156
* glances_plugin.py has a problem with specific docker output #1160
Backward-incompatible changes:

View File

@ -376,7 +376,7 @@ class Plugin(GlancesPlugin):
iow = [i for i in iocounters['io_service_bytes_recursive'] if i['op'] == 'Write'][0]['value']
ior_old = [i for i in self.iocounters_old[container_id]['io_service_bytes_recursive'] if i['op'] == 'Read'][0]['value']
iow_old = [i for i in self.iocounters_old[container_id]['io_service_bytes_recursive'] if i['op'] == 'Write'][0]['value']
except (IndexError, KeyError, TypeError) as e:
except (TypeError, IndexError, KeyError) as e:
# all_stats do not have io information
logger.debug("docker plugin - Cannot grab block IO usage for container {} ({})".format(container_id, e))
else: