Add catch if Docker lib is not in the good version

This commit is contained in:
Nicolargo 2015-03-16 13:22:53 +01:00
parent 13a8bf5fa3
commit 632faeb102

View File

@ -162,7 +162,7 @@ class Plugin(GlancesPlugin):
try:
self.docker_stats[c['Id']] = self.docker_client.stats(c['Id'], decode=True)
logger.debug("Create Docker stats object for container {}".format(c['Id']))
except AttributeError as e:
except (AttributeError, docker.errors.InvalidVersion) as e:
logger.error("Can not call Docker stats method {}".format(e))
# Get the docker stats