From cbf4e70c0934dce166ea47fcf38b3d92a26ae24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 13 Dec 2016 18:36:52 +0100 Subject: [PATCH] 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 --- trytond/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trytond/config.py b/trytond/config.py index 635fd7e8d1..0ee5eecfcc 100644 --- a/trytond/config.py +++ b/trytond/config.py @@ -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))