Avoid UnboundLocalError

Make sure cdash_phase is defined before referring to it.
This commit is contained in:
Zack Galbreath 2018-10-19 14:37:35 -04:00 committed by Todd Gamblin
parent 9110c727bb
commit 0bae6626a4

View file

@ -77,6 +77,7 @@ def build_report(self, filename, report_data):
# Parse output phase-by-phase. # Parse output phase-by-phase.
phase_regexp = re.compile(r"Executing phase: '(.*)'") phase_regexp = re.compile(r"Executing phase: '(.*)'")
cdash_phase = ''
for spec in report_data['specs']: for spec in report_data['specs']:
for package in spec['packages']: for package in spec['packages']:
if 'stdout' in package: if 'stdout' in package: