mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-03 16:39:25 +01:00
pylink: show a better error if the protocol module is missing
This commit is contained in:
parent
c36c32082f
commit
85e786904c
5
pylink
5
pylink
@ -58,8 +58,11 @@ if __name__ == '__main__':
|
|||||||
# Initialize all the networks one by one
|
# Initialize all the networks one by one
|
||||||
for network, sdata in conf.conf['servers'].items():
|
for network, sdata in conf.conf['servers'].items():
|
||||||
|
|
||||||
|
try:
|
||||||
protoname = sdata['protocol']
|
protoname = sdata['protocol']
|
||||||
|
except (KeyError, TypeError):
|
||||||
|
log.error("(%s) Configuration error: No protocol module specified, aborting.", network)
|
||||||
|
else:
|
||||||
# Fetch the correct protocol module
|
# Fetch the correct protocol module
|
||||||
proto = utils.getProtocolModule(protoname)
|
proto = utils.getProtocolModule(protoname)
|
||||||
world.networkobjects[network] = irc = classes.Irc(network, proto, conf.conf)
|
world.networkobjects[network] = irc = classes.Irc(network, proto, conf.conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user