Maintenance scheduled 24th July -- expect downtime along that day

Commit a24f85fa authored by Nicolas Chevillot's avatar Nicolas Chevillot

Improved error message in case an option is defined with inadequate type

parent c4b5fced
......@@ -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
# Thi 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