Skip to content

Commit

Permalink
Use izip_longest for Python 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Aug 23, 2022
1 parent 2dc2b0c commit 99fc332
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion easybuild/tools/loose_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
# - Changes to documentation and formatting

import re
from itertools import zip_longest
# Modified: Make this compatible with Python 2
try:
from itertools import zip_longest
except ImportError:
# Python 2
from itertools import izip_longest as zip_longest


class LooseVersion(object):
Expand Down

0 comments on commit 99fc332

Please sign in to comment.