From abf64ffde31113f5f46ef286703ff061fc57395f Mon Sep 17 00:00:00 2001
From: nicolargo <nicolas@nicolargo.com>
Date: Sat, 12 Oct 2019 11:45:36 +0200
Subject: [PATCH] Correct unitest

---
 glances/plugins/glances_plugin.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py
index 6a1c8606..23a76f80 100644
--- a/glances/plugins/glances_plugin.py
+++ b/glances/plugins/glances_plugin.py
@@ -86,10 +86,11 @@ def __init__(self,
         self.stats_history = self.init_stats_history()
 
         # Init the limits (configuration keys) dictionnary
-        logger.debug('Load section {} in {}'.format(self.plugin_name,
-                                                    config.config_file_paths()))
         self._limits = dict()
-        self.load_limits(config=config)
+        if config is not None:
+            logger.debug('Load section {} in {}'.format(self.plugin_name,
+                                                        config.config_file_paths()))
+            self.load_limits(config=config)
 
         # Init the actions
         self.actions = GlancesActions(args=args)
