Commits

Jason R. Coombs committed e3d7053

Fixed AttributeError around izip_longest

  • Participants
  • Parent commits 52716ec
  • Tags 0.8

Comments (0)

Files changed (1)

 	pass
 
 try:
+	zip_longest = itertools.zip_longest
+except AttributeError:
+	zip_longest = itertools.izip_longest
+
+try:
 	import keyring
 except Exception:
 	pass
 	anchors = []
 	linkified_parts = [_linkified_part(part, anchors)
 		for part in plain_text_parts]
-	pairs = itertools.izip_longest(
+	pairs = zip_longest(
 		linkified_parts,
 		HREF_pattern.findall(rst_content),
 		fillvalue='',