fix undefined variable usage and enumeration logic

This commit is contained in:
Martin Zimmermann 2016-01-08 23:03:18 +01:00
parent 00ed48a1d3
commit 8579cbd6f8

View File

@ -28,7 +28,8 @@ class Dispatcher(DispatcherMiddleware):
self.isso = {} self.isso = {}
for i, conf in enumerate(map(config.load(Dispatcher.default, conf))): for i, path in enumerate(confs):
conf = config.load(Dispatcher.default, path)
if not conf.get("general", "name"): if not conf.get("general", "name"):
logger.warn("unable to dispatch %r, no 'name' set", confs[i]) logger.warn("unable to dispatch %r, no 'name' set", confs[i])