Patchwork [3,of,5] check-code: handle range/xrange divergence

login
register
mail settings
Submitter timeless
Date May 11, 2016, 4:12 a.m.
Message ID <5a3db5d3f5259541fbf4.1462939968@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14989/
State Accepted
Headers show

Comments

timeless - May 11, 2016, 4:12 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1462930747 0
#      Wed May 11 01:39:07 2016 +0000
# Node ID 5a3db5d3f5259541fbf4d5e2aaf7d055e35b5d9a
# Parent  6d203832806957d66c7144fa415f9cf0f3724c9c
# EXP-Topic runtests
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 5a3db5d3f525
check-code: handle range/xrange divergence

Patch

diff -r 6d2038328069 -r 5a3db5d3f525 contrib/check-code.py
--- a/contrib/check-code.py	Wed May 11 01:37:20 2016 +0000
+++ b/contrib/check-code.py	Wed May 11 01:39:07 2016 +0000
@@ -27,6 +27,10 @@ 
 import re
 import sys
 try:
+    xrange
+except NameError:
+    xrange = range
+try:
     import re2
 except ImportError:
     re2 = None