Skip to content

Commit

Permalink
Return reference as not list. In case of failure return logs
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Jan 15, 2016
1 parent 656b623 commit 326758e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions hotness/consumers.py
Expand Up @@ -260,15 +260,21 @@ def _handle_anitya_update(self, upstream, package, msg):
result_rh, rh_stuff = self.buildsys.rebase_helper(package, upstream, tmp, bz)
if int(result_rh) == 0:
self.log.info('Rebase package %s to %s was SUCCESSFULL' % (package, version))
for number, reference in six.iteritems(rh_stuff['build_logs'],):
note = 'Scratch build completed. %s' % '\n'.join(reference)
self.bugzilla.follow_up(note, bz)
if 'build_ref' in rh_stuff['build_logs']:
for reference in six.iteritems(rh_stuff['build_logs']['build_ref']):
note = 'Scratch build completed. %s' % '\n'.join(reference)
self.bugzilla.follow_up(note, bz)
else:
self.log.info('Rebase package %s to %s FAILED. See for details' % (package, version))
self.bugzilla.follow_up('Rebase package %s to %s FAILED' % (package, version), bz)
for number, reference in six.iteritems(rh_stuff['build_logs']):
note = 'Scratch build failed. %s' % '\n'.join(reference)
self.bugzilla.follow_up(note, bz)
if 'build_ref' in rh_stuff['build_logs']:
for reference in six.iteritems(rh_stuff['build_logs']['build_ref']):
note = 'Scratch build failed. %s' % '\n'.join(reference)
self.bugzilla.follow_up(note, bz)
if 'logs' in rh_stuff['build_logs']:
for log in six.iteritems(rh_stuff['build_logs']['logs']):
note = 'Build log %s . %s' % os.path.basename(log)
self.bugzilla.attach_patch(log, note, bz)

for patch in rh_stuff['patches']:
self.bugzilla.follow_up(patch, bz)
Expand Down

0 comments on commit 326758e

Please sign in to comment.