X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_CPTA.py;h=a4459bc003957910231a68615f3375f5a7c89ed6;hb=0b752a7820087d5fec452d00c3bc42b8f1298501;hp=7279ea345aabfc52c325c6e8b02f4bc68d32923f;hpb=eb9e73f37019420ff8387c204b6621e73195fd97;p=csit.git diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py index 7279ea345a..a4459bc003 100644 --- a/resources/tools/presentation/generator_CPTA.py +++ b/resources/tools/presentation/generator_CPTA.py @@ -318,13 +318,21 @@ def _generate_all_charts(spec, input_data): logs.append(("WARNING", "No data for the test '{0}'". format(test_name))) continue + message = "index: {index}, test: {test}".format( + index=index, test=test_name) test_name = test_name.split('.')[-1] - trace, rslt = _generate_trending_traces( - test_data, - job_name=job_name, - build_info=build_info, - name='-'.join(test_name.split('-')[2:-1]), - color=COLORS[index]) + try: + trace, rslt = _generate_trending_traces( + test_data, + job_name=job_name, + build_info=build_info, + name='-'.join(test_name.split('-')[2:-1]), + color=COLORS[index]) + except IndexError: + message = "Out of colors: {}".format(message) + logs.append(("ERROR", message)) + logging.error(message) + continue traces.extend(trace) res.append(rslt) index += 1