From 8bf265f4f3adaf467c097a2d245d484c92d9d13d Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Sun, 28 Dec 2014 10:40:23 +0100 Subject: [PATCH] Correct an issue if args is None in the export load method --- glances/core/glances_stats.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glances/core/glances_stats.py b/glances/core/glances_stats.py index 34571c2c..36b6b8e1 100644 --- a/glances/core/glances_stats.py +++ b/glances/core/glances_stats.py @@ -106,6 +106,8 @@ class GlancesStats(object): def load_exports(self, args=None): """Load all exports module in the 'exports' folder.""" + if args is None: + return False header = "glances_" # Transform the arguments list into a dict # The aim is to chec if the export module should be loaded @@ -127,6 +129,7 @@ class GlancesStats(object): self._exports[export_name] = export_module.Export(args=args) # Log plugins list logger.debug("Available exports modules list: {0}".format(self.getAllExports())) + return True def getAllPlugins(self): """Return the plugins list."""