Fix an error in the KojiBuilder.

The issue is that _get_task_by_artifact returns either None or a dict of
info and we weren't handling that correctly.  My mistake.
This commit is contained in:
Ralph Bean
2016-11-02 10:23:42 -04:00
parent b2d1cf9f0d
commit 28183b9d3f

View File

@@ -579,11 +579,10 @@ chmod 644 %buildroot/%_rpmconfigdir/macros.d/macros.modules
# Skip existing builds
task_info = self._get_task_by_artifact(artifact_name)
task_id = task_info['task_id']
if task_id:
if task_info:
log.info("skipping build of %s. Build already exists (task_id=%s), via %s" % (
source, task_id, self))
return task_id, koji.BUILD_STATES['COMPLETE'], 'Build already exists.', task_info['nvr']
source, task_info['task_id'], self))
return task_info['task_id'], koji.BUILD_STATES['COMPLETE'], 'Build already exists.', task_info['nvr']
self._koji_whitelist_packages([artifact_name,])
if '://' not in source: