transports: convert generator to list before using it
This commit is contained in:
parent
5df43b7cea
commit
270a1e29be
|
@ -199,7 +199,7 @@ class EmailTransport(object):
|
||||||
ctx = Context({ 'announce': announce, 'site': site, 'category': category })
|
ctx = Context({ 'announce': announce, 'site': site, 'category': category })
|
||||||
subject = subject_template.render(ctx).replace('\r', '').replace('\n', '')
|
subject = subject_template.render(ctx).replace('\r', '').replace('\n', '')
|
||||||
body = body_template.render(ctx)
|
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',
|
logger.info(u'sending announce %(announce)s through %(mode)s to %(count)s emails',
|
||||||
dict(announce=announce, mode=self.identifier, count=len(emails)))
|
dict(announce=announce, mode=self.identifier, count=len(emails)))
|
||||||
try:
|
try:
|
||||||
|
|
Reference in New Issue