Commit bfca4fa1 authored by Jason R. Coombs's avatar Jason R. Coombs

Fixed AttributeError around izip_longest

parent 937eface
...@@ -26,6 +26,11 @@ try: ...@@ -26,6 +26,11 @@ try:
except NameError: except NameError:
pass pass
try:
zip_longest = itertools.zip_longest
except AttributeError:
zip_longest = itertools.izip_longest
try: try:
import keyring import keyring
except Exception: except Exception:
...@@ -239,7 +244,7 @@ def _linkified_text(rst_content): ...@@ -239,7 +244,7 @@ def _linkified_text(rst_content):
anchors = [] anchors = []
linkified_parts = [_linkified_part(part, anchors) linkified_parts = [_linkified_part(part, anchors)
for part in plain_text_parts] for part in plain_text_parts]
pairs = itertools.izip_longest( pairs = zip_longest(
linkified_parts, linkified_parts,
HREF_pattern.findall(rst_content), HREF_pattern.findall(rst_content),
fillvalue='', fillvalue='',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment