diff --git a/kedifa/test.py b/kedifa/test.py
index 4631f69681d3b26b12a206588c830c5687d085ce..b1cd5af7ea25244633bc7c978c33920e3ab000f1 100644
--- a/kedifa/test.py
+++ b/kedifa/test.py
@@ -67,7 +67,7 @@ def retry(callback, try_count=10, try_delay=0.1):
     a true value.
     Always returns the value returned by latest callback invocation.
     """
-    for _ in xrange(try_count):
+    for _ in range(try_count):
       result = callback()
       if result:
         break