summaryrefslogtreecommitdiffstats
path: root/glances/core/glances_staticlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/core/glances_staticlist.py')
-rw-r--r--glances/core/glances_staticlist.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/glances/core/glances_staticlist.py b/glances/core/glances_staticlist.py
index 1ff942a7..e754552e 100644
--- a/glances/core/glances_staticlist.py
+++ b/glances/core/glances_staticlist.py
@@ -17,7 +17,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-"""Manage the Glances server static list """
+"""Manage the Glances server static list."""
# System lib
from socket import gaierror, gethostbyname
@@ -28,7 +28,7 @@ from glances.core.glances_logging import logger
class GlancesStaticServer(object):
- """Manage the static servers list for the client browser"""
+ """Manage the static servers list for the client browser."""
_section = "serverlist"
@@ -39,8 +39,7 @@ class GlancesStaticServer(object):
self._server_list = self.load(config)
def load(self, config):
- """Load the server list from the configuration file"""
-
+ """Load the server list from the configuration file."""
server_list = []
if config is None:
@@ -54,7 +53,7 @@ class GlancesStaticServer(object):
postfix = 'server_%s_' % str(i)
# Read the server name (mandatory)
for s in ['name', 'port', 'alias']:
- new_server[s] = config.get_raw_option(self._section, '%s%s' % (postfix, s))
+ new_server[s] = config.get_value(self._section, '%s%s' % (postfix, s))
if new_server['name'] is not None:
# Manage optionnal information
if new_server['port'] is None:
@@ -85,9 +84,9 @@ class GlancesStaticServer(object):
return server_list
def get_servers_list(self):
- """Return the current server list (dict of dict)"""
+ """Return the current server list (dict of dict)."""
return self._server_list
def set_server(self, server_pos, key, value):
- """Set the key to the value for the server_pos (position in the list)"""
+ """Set the key to the value for the server_pos (position in the list)."""
self._server_list[server_pos][key] = value