From ddb169eeda5dedf4c905f8bd964f3b08d341bcc6 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 0e49c727..cad835d5 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 @@ -126,6 +128,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."""