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:
parent
87fdb1dde1
commit
03103bea14
2
conf.py
2
conf.py
@ -50,7 +50,7 @@ conf['pylink'] = conf['bot']
|
|||||||
confname = 'unconfigured'
|
confname = 'unconfigured'
|
||||||
|
|
||||||
def validate(condition, errmsg):
|
def validate(condition, errmsg):
|
||||||
"""Convenience function to validate conditions in validateConf()."""
|
"""Raises ConfigValidationError with errmsg unless the given condition is met."""
|
||||||
if not condition:
|
if not condition:
|
||||||
raise ConfigValidationError(errmsg)
|
raise ConfigValidationError(errmsg)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user