comparison src/twisted/plugins/libervia_server.py @ 570:2a4e071633f7

server side (twisted plugin): fixed bad use of default value in getConfig
author Goffi <goffi@goffi.org>
date Sat, 11 Oct 2014 16:28:27 +0200
parents 530c88c1deee
children 5319110a862c
comparison
equal deleted inserted replaced
569:fb81aeccde8b 570:2a4e071633f7
108 config = SafeConfigParser() 108 config = SafeConfigParser()
109 config.read(C.CONFIG_FILES) 109 config.read(C.CONFIG_FILES)
110 for param in self.optParameters + OPT_PARAMETERS_CFG: 110 for param in self.optParameters + OPT_PARAMETERS_CFG:
111 name = param[0] 111 name = param[0]
112 try: 112 try:
113 value = getConfig(config, 'libervia', name) 113 value = getConfig(config, 'libervia', name, Exception)
114 try: 114 try:
115 param[2] = param[4](value) 115 param[2] = param[4](value)
116 except IndexError: # the coerce method is optional 116 except IndexError: # the coerce method is optional
117 param[2] = value 117 param[2] = value
118 except (NoSectionError, NoOptionError): 118 except (NoSectionError, NoOptionError):