3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

conf: use a more informative description for validate()

This commit is contained in:
James Lu 2018-03-02 20:19:26 -08:00
parent 87fdb1dde1
commit 03103bea14

View File

@ -50,7 +50,7 @@ conf['pylink'] = conf['bot']
confname = 'unconfigured'
def validate(condition, errmsg):
"""Convenience function to validate conditions in validateConf()."""
"""Raises ConfigValidationError with errmsg unless the given condition is met."""
if not condition:
raise ConfigValidationError(errmsg)