Skip to content

Commit 597787c

Browse files
author
cclauss
authored
Define xrange() in Python 3 in coverparse.py
1 parent 6c4e02c commit 597787c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

grumpy-tools-src/grumpy_tools/coverparse.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
import re
2323
import sys
2424

25+
try:
26+
xrange # Python 2
27+
except NameError:
28+
xrange = range # Python 3
2529

2630
cover_re = re.compile(r'([^:]+):(\d+)\.\d+,(\d+).\d+ \d+ (\d+)$')
2731

0 commit comments

Comments
 (0)