提交 07b737ab 编写于 作者: N nicolargo

Args are now given to the Glances client

上级 7b102b82
......@@ -43,7 +43,7 @@ class GlancesStats(object):
self.load_modules(self.args)
# Load the limits (for plugins)
self.load_limits(config)
self.load_limits(self.config)
def __getattr__(self, item):
"""Overwrite the getattr method in case of attribute is not found.
......@@ -72,11 +72,13 @@ class GlancesStats(object):
# Init the plugins dict
self._plugins = collections.defaultdict(dict)
# Load the plugins
self.load_plugins(args=args)
# Init the export modules dict
self._exports = collections.defaultdict(dict)
# Load the export modules
self.load_exports(args=args)
......
......@@ -51,7 +51,7 @@ class GlancesStatsClient(GlancesStats):
# for example, the file glances_xxx.py
# generate self._plugins_list["xxx"] = ...
logger.debug("Server uses {} plugin".format(item))
self._plugins[item] = plugin.Plugin()
self._plugins[item] = plugin.Plugin(args=self.args)
# Restoring system path
sys.path = sys_path
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册