From d0a81bccd7c4505d9115ee41b9f537d8bebac4df Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 4 Oct 2016 12:18:44 +0800 Subject: configs/validate.py: Explain these checkers differ to Validator's NOTE: these checker functions check on the whole configuration, and have no relation to the checker functions of the `Validator` class. --- fg21sim/configs/validate.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'fg21sim') diff --git a/fg21sim/configs/validate.py b/fg21sim/configs/validate.py index b9accdf..c4736dc 100644 --- a/fg21sim/configs/validate.py +++ b/fg21sim/configs/validate.py @@ -3,6 +3,12 @@ """ Custom validations for the configurations. + +NOTE +---- +These checker functions check the configurations as a whole, and may check +a config item against its context, +Therefore, they are very different to the checker function of `Validator`. """ from ..errors import ConfigError @@ -14,7 +20,7 @@ def _check_missing(configs, keys): keys = [keys, ] for key in keys: if not configs.getn(key): - raise ConfigError('config "%s" missing' % key) + raise ConfigError('Required config "%s" missing value' % key) return True -- cgit v1.2.2