summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/ipaddr-py/ipaddr.py10
-rwxr-xr-xextras/failed-tests.py2
-rwxr-xr-xextras/rebalance.py2
-rw-r--r--xlators/features/glupy/src/glupy/__init__.py2
4 files changed, 8 insertions, 8 deletions
diff --git a/contrib/ipaddr-py/ipaddr.py b/contrib/ipaddr-py/ipaddr.py
index 6ebd22a33ce..61033e238d1 100644
--- a/contrib/ipaddr-py/ipaddr.py
+++ b/contrib/ipaddr-py/ipaddr.py
@@ -1079,7 +1079,7 @@ class _BaseV4(object):
"""
octets = []
- for _ in xrange(4):
+ for _ in range(4):
octets.insert(0, str(ip_int & 0xFF))
ip_int >>= 8
return '.'.join(octets)
@@ -1431,7 +1431,7 @@ class _BaseV6(object):
# This indicates that a run of zeroes has been skipped.
try:
skip_index, = (
- [i for i in xrange(1, len(parts) - 1) if not parts[i]] or
+ [i for i in range(1, len(parts) - 1) if not parts[i]] or
[None])
except ValueError:
# Can't have more than one '::'
@@ -1466,11 +1466,11 @@ class _BaseV6(object):
try:
# Now, parse the hextets into a 128-bit integer.
ip_int = 0
- for i in xrange(parts_hi):
+ for i in range(parts_hi):
ip_int <<= 16
ip_int |= self._parse_hextet(parts[i])
ip_int <<= 16 * parts_skipped
- for i in xrange(-parts_lo, 0):
+ for i in range(-parts_lo, 0):
ip_int <<= 16
ip_int |= self._parse_hextet(parts[i])
return ip_int
@@ -1589,7 +1589,7 @@ class _BaseV6(object):
ip_int = self._ip_int_from_string(ip_str)
parts = []
- for i in xrange(self._HEXTET_COUNT):
+ for i in range(self._HEXTET_COUNT):
parts.append('%04x' % (ip_int & 0xFFFF))
ip_int >>= 16
parts.reverse()
diff --git a/extras/failed-tests.py b/extras/failed-tests.py
index 1ef1a954f4f..54406f91ad3 100755
--- a/extras/failed-tests.py
+++ b/extras/failed-tests.py
@@ -98,7 +98,7 @@ def get_summary(cut_off_date, reg_link):
'''
success_count = 0
failure_count = 0
- for page in xrange(0, MAX_BUILDS, 100):
+ for page in range(0, MAX_BUILDS, 100):
build_info = requests.get(''.join([
BASE,
reg_link,
diff --git a/extras/rebalance.py b/extras/rebalance.py
index 69ce282b39e..871b06682d5 100755
--- a/extras/rebalance.py
+++ b/extras/rebalance.py
@@ -263,7 +263,7 @@ if __name__ == "__main__":
while used < len(bricks):
best_place = used
best_score = get_score(bricks)
- for i in xrange(used):
+ for i in range(used):
new_bricks = bricks[:]
del new_bricks[used]
new_bricks.insert(i,bricks[used])
diff --git a/xlators/features/glupy/src/glupy/__init__.py b/xlators/features/glupy/src/glupy/__init__.py
index 16ff3101de8..385a1e848df 100644
--- a/xlators/features/glupy/src/glupy/__init__.py
+++ b/xlators/features/glupy/src/glupy/__init__.py
@@ -75,7 +75,7 @@ class ia_prot_t (Structure):
# For checking file type.
(IA_INVAL, IA_IFREG, IA_IFDIR, IA_IFLNK, IA_IFBLK, IA_IFCHR, IA_IFIFO,
- IA_IFSOCK) = xrange(8)
+ IA_IFSOCK) = range(8)
class iatt_t (Structure):