3
0
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:
James Lu 2017-07-12 22:39:28 -07:00
parent fceb2efce4
commit db778debb8
2 changed files with 3 additions and 2 deletions

View File

@ -332,8 +332,8 @@ class PyLinkNetworkCore(utils.DeprecatedAttributesObject, utils.CamelCaseToSnake
try: try:
self.validate_server_conf() self.validate_server_conf()
except AssertionError as e: except Exception as e:
log.exception("(%s) Configuration error: %s", self.name, e) log.error("(%s) Configuration error: %s", self.name, e)
raise raise
def _run_autoconnect(self): def _run_autoconnect(self):

View File

@ -26,6 +26,7 @@ class IRCCommonProtocol(IRCNetwork):
def validate_server_conf(self): def validate_server_conf(self):
"""Validates that the server block given contains the required keys.""" """Validates that the server block given contains the required keys."""
for k in self.conf_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, conf.validate(k in self.serverdata,
"Missing option %r in server block for network %s." "Missing option %r in server block for network %s."
% (k, self.name)) % (k, self.name))