THRIFT-1857 Python 3 Support
Client: Python
Patch: Thomas Bartelmess, Eevee (Alex Munroe), helgridly, Christian Verkerk, Jeroen Vlek, Nobuaki Sukegawa
This closes #213 and closes #680
diff --git a/test/py/TestSocket.py b/test/py/TestSocket.py
index b9bdf27..55e4996 100755
--- a/test/py/TestSocket.py
+++ b/test/py/TestSocket.py
@@ -26,7 +26,7 @@
options, args = parser.parse_args()
del sys.argv[1:] # clean up hack so unittest doesn't complain
sys.path.insert(0, options.genpydir)
-sys.path.insert(0, glob.glob('../../lib/py/build/lib.*')[0])
+sys.path.insert(0, glob.glob('../../lib/py/build/lib*')[0])
from ThriftTest import ThriftTest
from ThriftTest.ttypes import *
@@ -41,7 +41,7 @@
class TimeoutTest(unittest.TestCase):
def setUp(self):
- for i in xrange(50):
+ for i in range(50):
try:
# find a port we can use
self.listen_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -58,7 +58,7 @@
try:
leaky = []
- for i in xrange(100):
+ for i in range(100):
socket = TSocket.TSocket('localhost', self.port)
socket.setTimeout(10)
socket.open()