From 77a55a2fc4d6abf79ac0fdbb5fbb060e79a51b31 Mon Sep 17 00:00:00 2001 From: shahar salzman Date: Wed, 13 Feb 2019 17:18:38 +0200 Subject: [PATCH] scripts: Use range instead of xrange Change-Id: I15c1877fea6ae0bccdcd8b319941d7a30180fe8c Signed-off-by: shahar salzman Reviewed-on: https://review.gerrithub.io/c/444424 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- scripts/gdb_macros.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/gdb_macros.py b/scripts/gdb_macros.py index e59f767662..74234de7b1 100644 --- a/scripts/gdb_macros.py +++ b/scripts/gdb_macros.py @@ -33,7 +33,7 @@ class SpdkArr(object): self.element_type = element_type def __iter__(self): - for i in xrange(0, self.num_elements): + for i in range(0, self.num_elements): curr = (self.arr_pointer + i).dereference() if (curr == 0x0): continue @@ -149,7 +149,7 @@ class NvmfSubsystem(SpdkObject): def get_ns_list(self): max_nsid = int(self.obj['max_nsid']) ns_list = [] - for i in xrange(0, max_nsid): + for i in range(0, max_nsid): nsptr = (self.obj['ns'] + i).dereference() if nsptr == 0x0: continue