python3: replace thread module with threading

partial: https://github.com/vmware/pyvmomi/issues/55
This commit is contained in:
Kevin McCarthy
2014-07-25 10:30:41 -10:00
committed by Shawn Hartsock
parent de17170440
commit a96438c0c1

View File

@@ -27,10 +27,6 @@ import sys
import os
import socket
import subprocess
if PY2:
from thread import allocate_lock
if PY3:
from _thread import allocate_lock
import time
from xml.parsers.expat import ParserCreate
@@ -1177,7 +1173,7 @@ class SoapStubAdapter(SoapStubAdapterBase):
self.poolSize = poolSize
self.pool = []
self.connectionPoolTimeout = connectionPoolTimeout
self.lock = allocate_lock()
self.lock = threading.Lock()
self.schemeArgs = {}
if certKeyFile:
self.schemeArgs['key_file'] = certKeyFile