transports: convert generator to list before using it

This commit is contained in:
Benjamin Dauvergne 2013-06-26 11:15:51 +02:00
parent 5df43b7cea
commit 270a1e29be
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ class EmailTransport(object):
ctx = Context({ 'announce': announce, 'site': site, 'category': category })
subject = subject_template.render(ctx).replace('\r', '').replace('\n', '')
body = body_template.render(ctx)
emails = self.get_emails(category)
emails = list(self.get_emails(category))
logger.info(u'sending announce %(announce)s through %(mode)s to %(count)s emails',
dict(announce=announce, mode=self.identifier, count=len(emails)))
try: