提交 80db8225 编写于 作者: N nicolargo

Catch error message in Docker plugin

上级 f8f53ffc
...@@ -93,10 +93,13 @@ class Plugin(GlancesPlugin): ...@@ -93,10 +93,13 @@ class Plugin(GlancesPlugin):
def connect(self): def connect(self):
"""Connect to the Docker server.""" """Connect to the Docker server."""
if import_error_tag: try:
return None ret = docker.from_env()
except Exception as e:
logger.error("docker plugin - Can not connect to Docker ({})".format(e))
ret = None
return docker.from_env() return ret
def reset(self): def reset(self):
"""Reset/init the stats.""" """Reset/init the stats."""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册