diff options
author | nicolargo <nicolashennion@gmail.com> | 2016-04-30 22:32:30 +0200 |
---|---|---|
committer | nicolargo <nicolashennion@gmail.com> | 2016-04-30 22:32:30 +0200 |
commit | 130b7a15c8e37ca793635f11c89c9f5bde7d6fe7 (patch) | |
tree | 262f4dda1f9682fdc787298414eee48b16a58b47 /glances/amps_list.py | |
parent | 3203d84bc80624e99389b95e19487397de23a98b (diff) |
Correct issue if no configuration file is provided (Travis UT)
Diffstat (limited to 'glances/amps_list.py')
-rw-r--r-- | glances/amps_list.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/glances/amps_list.py b/glances/amps_list.py index 2635e530..06eaee6b 100644 --- a/glances/amps_list.py +++ b/glances/amps_list.py @@ -53,6 +53,9 @@ class AmpsList(object): def load_configs(self): """Load the AMP configuration files.""" + if self.config is None: + return False + header = "glances_" # For each AMP scrip, call the load_config method for s in self.config.sections(): @@ -81,6 +84,8 @@ class AmpsList(object): # Log AMPs list logger.debug("AMPs' list: {0}".format(self.getList())) + return True + def __str__(self): return str(self.__amps_dict) |