Commits

Jason R. Coombs  committed 4d40c01

Fixed error in notification - dest_addrs needs to return a list

  • Participants
  • Parent commits 15862bf
  • Tags 2.0.1

Comments (0)

Files changed (2)

File jaraco/net/notification.py

 	"""
 	A string separated by a separator. Overrides __iter__ for getting
 	the values.
-	
+
 	>>> list(SeparatedValues('a,b,c'))
 	[u'a', u'b', u'c']
-	
+
 	Whitespace is stripped and empty values are discarded.
-	
+
 	>>> list(SeparatedValues(' a,   b   , c,  '))
 	[u'a', u'b', u'c']
-	
+
 	"""
 	separator = ','
-	
+
 	def __iter__(self):
 		parts = self.split(self.separator)
 		return itertools.ifilter(None, (part.strip() for part in parts))
 
 	@property
 	def dest_addrs(self):
-		return itertools.chain.from_iterable(
+		return list(itertools.chain.from_iterable(
 			SeparatedValues(getattr(self, key, ''))
 			for key in ('to_addrs', 'cc_addrs', 'bcc_addrs')
-		)
+		))
 
 	def get_connect_args(self):
 		attrs = 'host', 'port'

File tests/test_notification.py

 			cc_addrs = "c@example.com,d@example.com",
 			bcc_addrs = "e@example.com,f@example.com",
 		)
-		assert len(list(mbx.dest_addrs)) == 6
-		
+		assert len(mbx.dest_addrs) == 6