-
Notifications
You must be signed in to change notification settings - Fork 311
Sample was failing if wsdl file location is passed as ../samples/vsph… #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -82,7 +82,8 @@ def options(self): | |||
self.args = self.argparser.parse_args() | |||
|
|||
def setup(self): | |||
self.lswsdl = self.args.lswsdl | |||
if(self.args.lswsdl): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the if check?
Can you also squash the commits to one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes..even if wsdlpath is not passed as argument, os.path.abspath gets called on None object, which is throwing error. Hence I added If for the checking argument.
Squashed commits
@@ -82,7 +82,8 @@ def options(self): | |||
self.args = self.argparser.parse_args() | |||
|
|||
def setup(self): | |||
self.lswsdl = self.args.lswsdl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about following?
self.lswsdl = self.args.lswsdl
if self.lswsdl:
self.lswsdl = os.path.abspath(self.lswsdl)
else:
self.lswsdl = os.path.join(
os.path.dirname(os.path.abspath(file)),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.. Second IF condition was to check if lswsdl is None always. I think else is more effective.
But since lswsdl is instance variable, skipping self.lswsdl = self.args.lswsdl, adding check on arg passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pgbidkar Looks good. You can remove the () on if. Also please squash the commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tianhao. Done the changes, squashed all commits and rebased.
Please let me know if more changes required
…ere/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 <[email protected]> Modified if conition, removed optional braces Signed-off-by: PavanBidkar <[email protected]>
…ere/sso/wsdl/lookupservice.wsdl.
Modified Samples to convert passed wsdl file path to abspath
Signed-off-by: Pavan Bidkar [email protected]