summaryrefslogtreecommitdiff
blob: 5e087ce96ba1c176836b6e14ae39e0b14202a429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)