aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs/validate.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-04 12:18:44 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-04 12:18:44 +0800
commitd0a81bccd7c4505d9115ee41b9f537d8bebac4df (patch)
tree7494167f130dd6bdb855d2302bb5e40dc5c04a00 /fg21sim/configs/validate.py
parentf9dc7bc7aa307b96e39905632dd86112349a5e2d (diff)
downloadfg21sim-d0a81bccd7c4505d9115ee41b9f537d8bebac4df.tar.bz2
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.
Diffstat (limited to 'fg21sim/configs/validate.py')
-rw-r--r--fg21sim/configs/validate.py8
1 files changed, 7 insertions, 1 deletions
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