don't fail if child task doesn't provide source

While the current code will always provide it, the older code did
not. When a Koji system is updated to this version, we could have
a restarted build task read the result of a previously finished
buildSRPMFromSCM task that ran with the old code.
This commit is contained in:
Mike McLean 2017-12-07 17:16:15 -05:00
parent 15709e019c
commit fab1cc4245

View file

@ -937,7 +937,10 @@ class BuildTask(BaseTaskHandler):
parent=self.id)
# wait for subtask to finish
result = self.wait(task_id)[task_id]
self.source = result['source']
if 'source' in result:
self.source = result['source']
else:
self.logger.warning('subtask did not provide source data')
srpm = result['srpm']
return srpm