From 099f059086b4250aa0d2546ea3115aae95597ffd Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 12 Mar 2018 18:19:10 +0100 Subject: [PATCH] cpplint_unittest.py: Define xrange for Python 3 --- cpplint/cpplint_unittest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpplint/cpplint_unittest.py b/cpplint/cpplint_unittest.py index 50d1d82..b3c7725 100755 --- a/cpplint/cpplint_unittest.py +++ b/cpplint/cpplint_unittest.py @@ -43,6 +43,11 @@ import unittest import cpplint +try: + xrange # Python 2 +except NameError: + xrange = range # Python 3 + # This class works as an error collector and replaces cpplint.Error # function for the unit tests. We also verify each category we see