fix user friendly reporting of config errors
Change-Id: I42ec1ad2e18a0363fb7317c86743ff2f6665f049
This commit is contained in:
parent
6ea97b0012
commit
7c0101f6bd
@ -235,15 +235,15 @@ class Server:
|
||||
classname = opts.pop('class')
|
||||
cls = get_class(classname)
|
||||
modobj = cls(modname, self.log.getChild(modname), opts, self)
|
||||
# all used args should be popped from opts!
|
||||
if opts:
|
||||
errors.append(self.unknown_options(cls, opts))
|
||||
self.modules[modname] = modobj
|
||||
except ConfigError as e:
|
||||
errors.append(str(e))
|
||||
except Exception as e:
|
||||
badclass = classname
|
||||
errors.append('error while loading %s' % badclass)
|
||||
# all used args should be popped from opts!
|
||||
if opts:
|
||||
self.unknown_options(cls, opts)
|
||||
self.modules[modname] = modobj
|
||||
|
||||
poll_table = dict()
|
||||
# all objs created, now start them up and interconnect
|
||||
|
Loading…
x
Reference in New Issue
Block a user