Do not use mutable default argument

See e2912943c5.
pull/1005/head
Alessio Sergi 2017-01-09 20:17:37 +01:00
parent 870758a9e6
commit ffaf0956bd
1 changed files with 3 additions and 1 deletions

View File

@ -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 <section> 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