mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
Fix error logging for validate_server_conf (#472)
This commit is contained in:
parent
fceb2efce4
commit
db778debb8
@ -332,8 +332,8 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
|
||||
|
||||
try:
|
||||
self.validate_server_conf()
|
||||
except AssertionError as e:
|
||||
log.exception("(%s) Configuration error: %s", self.name, e)
|
||||
except Exception as e:
|
||||
log.error("(%s) Configuration error: %s", self.name, e)
|
||||
raise
|
||||
|
||||
def _run_autoconnect(self):
|
||||
|
@ -26,6 +26,7 @@ class IRCCommonProtocol(IRCNetwork):
|
||||
def validate_server_conf(self):
|
||||
"""Validates that the server block given contains the required keys."""
|
||||
for k in self.conf_keys:
|
||||
log.debug('(%s) Checking presence of conf key %r', self.name, k)
|
||||
conf.validate(k in self.serverdata,
|
||||
"Missing option %r in server block for network %s."
|
||||
% (k, self.name))
|
||||
|
Loading…
Reference in New Issue
Block a user