From a96438c0c1d739e8928b6f1882f12b85b3c166ab Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 25 Jul 2014 10:30:41 -1000 Subject: [PATCH] python3: replace thread module with threading partial: https://github.com/vmware/pyvmomi/issues/55 --- pyVmomi/SoapAdapter.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pyVmomi/SoapAdapter.py b/pyVmomi/SoapAdapter.py index 41130b757..a97b545aa 100644 --- a/pyVmomi/SoapAdapter.py +++ b/pyVmomi/SoapAdapter.py @@ -27,10 +27,6 @@ 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 @@ def __init__(self, host='localhost', port=443, ns=None, path='/sdk', 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