fix user friendly reporting of config errors
Change-Id: I42ec1ad2e18a0363fb7317c86743ff2f6665f049
This commit is contained in:
parent
3b03e578bb
commit
fb01f81cb6
@ -235,15 +235,15 @@ class Server:
|
|||||||
classname = opts.pop('class')
|
classname = opts.pop('class')
|
||||||
cls = get_class(classname)
|
cls = get_class(classname)
|
||||||
modobj = cls(modname, self.log.getChild(modname), opts, self)
|
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:
|
except ConfigError as e:
|
||||||
errors.append(str(e))
|
errors.append(str(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
badclass = classname
|
badclass = classname
|
||||||
errors.append('error while loading %s' % badclass)
|
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()
|
poll_table = dict()
|
||||||
# all objs created, now start them up and interconnect
|
# all objs created, now start them up and interconnect
|
||||||
|
Loading…
x
Reference in New Issue
Block a user