From 61f3e72771e190e85f9631902d03c4f866db329d Mon Sep 17 00:00:00 2001 From: PavanBidkar Date: Wed, 12 Apr 2017 18:38:09 +0530 Subject: [PATCH] Sample was failing if wsdl file location is passed as ../samples/vsphere/sso/wsdl/lookupservice.wsdl. Modified Samples to convert passed wsdl file path to abspath Added If condition to check wsdlpath is passed Signed-off-by: PavanBidkar Modified if conition, removed optional braces Signed-off-by: PavanBidkar --- samples/vsphere/sso/external_psc_sso_workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/vsphere/sso/external_psc_sso_workflow.py b/samples/vsphere/sso/external_psc_sso_workflow.py index 4c46b472..c124338a 100644 --- a/samples/vsphere/sso/external_psc_sso_workflow.py +++ b/samples/vsphere/sso/external_psc_sso_workflow.py @@ -82,8 +82,9 @@ class ExternalPscSsoWorkflow(object): self.args = self.argparser.parse_args() def setup(self): - self.lswsdl = self.args.lswsdl - if not self.lswsdl: + if self.args.lswsdl: + self.lswsdl = os.path.abspath(self.args.lswsdl) + else: self.lswsdl = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'wsdl', @@ -113,7 +114,6 @@ class ExternalPscSsoWorkflow(object): # Convert wsdl path to url self.lswsdl = parse.urljoin('file:', request.pathname2url(self.lswsdl)) - lookupservicehelper = LookupServiceHelper(wsdl_url=self.lswsdl, soap_url=self.lsurl, skip_verification=self.skip_verification)