Show example (when available) for "invalid value" error
This commit is contained in:
parent
229a45a491
commit
e814494777
1 changed files with 6 additions and 1 deletions
|
@ -169,6 +169,11 @@ class Module(ModuleManager.BaseModule):
|
|||
try:
|
||||
result = self._config(export_settings, target, setting, value)
|
||||
except ConfigInvalidValue:
|
||||
example = setting_info.get("example", None)
|
||||
if not example == None:
|
||||
raise utils.EventError("Invalid value. Example: %s" %
|
||||
example)
|
||||
else:
|
||||
raise utils.EventError("Invalid value")
|
||||
except ConfigSettingInexistent:
|
||||
raise utils.EventError("Setting not set")
|
||||
|
|
Loading…
Reference in a new issue