From f93ddf9d63895755338e8b82b6262de440ec268d Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 25 Jul 2014 10:32:22 -1000 Subject: [PATCH] python3: change call to urlparse partial: https://github.com/vmware/pyvmomi/issues/55 --- pyVmomi/SoapAdapter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyVmomi/SoapAdapter.py b/pyVmomi/SoapAdapter.py index a97b545aa..f2380acd7 100644 --- a/pyVmomi/SoapAdapter.py +++ b/pyVmomi/SoapAdapter.py @@ -28,7 +28,8 @@ import socket import subprocess import time - +from six.moves.urllib.parse import urlparse +from datetime import datetime from xml.parsers.expat import ParserCreate # We have our own escape functionality. # from xml.sax.saxutils import escape @@ -1136,7 +1137,7 @@ def __init__(self, host='localhost', port=443, ns=None, path='/sdk', # the UnixSocketConnection ctor expects to find it -- see above self.host = sock elif url: - scheme, self.host, urlpath = urlparse(url)[:3] + scheme, self.host, urlpath = urlparse.urlparse(url)[:3] # Only use the URL path if it's sensible, otherwise use the path # keyword argument as passed in. if urlpath not in ('', '/'):