From ffaf0956bd15c86bb6e85dbc38f98dbb2dd9623a Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Mon, 9 Jan 2017 20:17:37 +0100 Subject: [PATCH] Do not use mutable default argument See e2912943c527594f4f91f691714bf6408ee5d6d0. --- glances/exports/glances_export.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glances/exports/glances_export.py b/glances/exports/glances_export.py index b2e2b565..459fe9f6 100644 --- a/glances/exports/glances_export.py +++ b/glances/exports/glances_export.py @@ -71,7 +71,7 @@ class GlancesExport(object): 'docker', 'uptime'] - def load_conf(self, section, mandatories=['host', 'port'], options=[]): + def load_conf(self, section, mandatories=['host', 'port'], options=None): """Load the export
configuration in the Glances configuration file. :param section: name of the export section to load @@ -80,6 +80,8 @@ class GlancesExport(object): :returns: Boolean -- True if section is found """ + options = options or [] + if self.config is None: return False