Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six.

This commit is contained in:
Tim Abbott
2015-11-01 08:15:05 -08:00
parent 5ffb4deb8d
commit f7878a61e1
18 changed files with 44 additions and 22 deletions

View File

@@ -5,6 +5,7 @@ import time
import ctypes
import threading
import six
from six.moves import range
# Based on http://code.activestate.com/recipes/483752/
@@ -70,7 +71,7 @@ def timeout(timeout, func, *args, **kwargs):
#
# We need to retry, because an async exception received while the
# thread is in a system call is simply ignored.
for i in xrange(10):
for i in range(10):
thread.raise_async_timeout()
time.sleep(0.1)
if not thread.isAlive():