Do not try to read empty filename configuration
configfile can be a list with None values as the default argument value is a list with TRYTOND_CONFIG environment variable which could be not set. issue6101 review25891002
This commit is contained in:
+3
-1
@@ -68,7 +68,9 @@ class TrytonConfigParser(ConfigParser.RawConfigParser):
|
||||
self.update_etc()
|
||||
|
||||
def update_etc(self, configfile=os.environ.get('TRYTOND_CONFIG')):
|
||||
if not configfile:
|
||||
if isinstance(configfile, basestring):
|
||||
configfile = [configfile]
|
||||
if not configfile or not filter(None, configfile):
|
||||
return
|
||||
read_files = self.read(configfile)
|
||||
logger.info('using %s as configuration files', ', '.join(read_files))
|
||||
|
||||
Reference in New Issue
Block a user