Commit 7c97452f authored by Tristan Gingold's avatar Tristan Gingold

Merge branch…

Merge branch '91-in-case-an-option-in-a-manifest-uses-a-type-which-is-not-allowed-the-error-message-is-highly-cryptic-and-doesn-t-help-to-solve-the-issue' into 'master'

Resolve "In case an option in a Manifest uses a type which is not allowed, the error message is highly cryptic and doesn't help to solve the issue"

Closes #91

See merge request !3
parents 23be310b a24f85fa
......@@ -373,8 +373,8 @@ types:[<type 'int'>]
opt = self[opt_name]
if type(val) not in opt.types:
raise RuntimeError(
"Given option (%s) doesn't match specified types: (%s)" %
(str(type(val)), str(opt.types)))
"Given option '%s' is of type %s: '%s', it doesn't match allowed types: (%s), file %s" %
(opt_name, str(type(val)), val, str(opt.types), self.config_file))
ret[opt_name] = val
# This is only for the options of the dictionary class:
if isinstance(val, type(dict())):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment