Commit 04afcbef authored by Charlie Hoy's avatar Charlie Hoy
Browse files

adding exception

parent 1c356c96
......@@ -88,6 +88,10 @@ def add_variations(cp, section, option, values=None, allowed_values=None):
if len(vals) >1:
if labels is not None:
if len(labels) != len(vals):
raise ValueError(
"The number of labels does not match the "
"number of {}'s given".format(option))
return {(section,option): [[i,j] for i,j in zip(vals, labels)]}
return {(section,option): vals}
elif len(vals)==1:
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