提交 0d634d01 编写于 作者: N nicolargo

Correct an issue with Docker client

上级 ee2bce20
......@@ -148,16 +148,21 @@ class Plugin(GlancesPlugin):
@GlancesPlugin._log_result_decorator
def update(self):
"""Update Docker stats using the input method."""
global docker_tag
# Reset stats
self.reset()
# Get the current Docker API client
if not self.docker_client:
# First time, try to connect to the server
self.docker_client = self.connect()
if self.docker_client is None:
global docker_tag
try:
self.docker_client = self.connect()
except:
docker_tag = False
else:
if self.docker_client is None:
docker_tag = False
# The Docker-py lib is mandatory
if not docker_tag:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册