Fix irc message for multiple bugs found

This commit is basically the dual of change:
Iaf28dbe9909c60b1e2206a79faaf5190f792252d which fixed the gerrit
message when multiple bugs were identified. This just does the same
thing for the irc messages too, which were overlooked in the other
patch.

Change-Id: Ic446d9a1568b4b017455f85ce78b192910904b47
This commit is contained in:
Matthew Treinish 2013-10-22 16:28:54 -04:00
parent 4dbfc778e2
commit b2f24e72a1

View File

@ -117,12 +117,9 @@ class RecheckWatch(threading.Thread):
msg = ('%s change: %s failed tempest because of:' % (
data['change']['project'],
data['change']['url']))
if len(data['bug_numbers']) > 1:
for bug in data['bug_numbers']:
msg += ' https://bugs.launchpad.net/bugs/%s and' % bug
else:
msg += (' https://bugs.launchpad.net/bugs/%s' %
data['bug_numbers'][0])
bug_urls = ['https://bugs.launchpad.net/bugs/%s' % x for x
in data['bug_numbers']]
msg += ' and '.join(bug_urls)
self.log.info('Compiled Message %s: %s' % (channel, msg))
self.ircbot.send(channel, msg)