Skip to content
Snippets Groups Projects
Commit 7e8e5ac0 authored by James Johnson's avatar James Johnson
Browse files

Reworded error message for easier grouping

parent a9361422
No related branches found
No related tags found
1 merge request!163Verifier Additions
......@@ -37,25 +37,24 @@ def _check_mco(workflow):
error="MCO has no defined parameters"))
for idx, param in enumerate(mco.parameters):
p_name = param.factory.name
p_desc = param.factory.name
if len(param.name.strip()) == 0:
errors.append(VerifierError(subject=param,
error="Parameter {} ({}) has empty "
"name".format(idx, p_name)))
error="Empty Name - Parameter {} "
"({})".format(idx, p_desc)))
if len(param.type.strip()) == 0:
errors.append(VerifierError(subject=param,
error="Parameter {} ({}) has empty "
"type".format(idx, p_name)))
error="Empty Type - Parameter {} "
"({})".format(idx, p_desc)))
for idx, kpi in enumerate(mco.kpis):
if len(kpi.name.strip()) == 0:
errors.append(VerifierError(subject=kpi,
error="KPI {} has empty name".format(
error="Empty Name - KPI {}".format(
idx)))
if kpi.objective == '':
errors.append(VerifierError(subject=kpi,
error="KPI {} has empty "
"objective".format(idx)))
error="Empty Objective - KPI {}".format(idx)))
return errors
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment