summaryrefslogtreecommitdiffstats
path: root/glances/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/config.py')
-rw-r--r--glances/config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/glances/config.py b/glances/config.py
index 79dd5a82..ece17c9b 100644
--- a/glances/config.py
+++ b/glances/config.py
@@ -325,6 +325,13 @@ class Config(object):
pass
return ret
+ def get_list_value(self, section, option, default=None, separator=','):
+ """Get the list value of an option, if it exists."""
+ try:
+ return self.parser.get(section, option).split(separator)
+ except (NoOptionError, NoSectionError):
+ return default
+
def get_int_value(self, section, option, default=0):
"""Get the int value of an option, if it exists."""
try: