-
Notifications
You must be signed in to change notification settings - Fork 14
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
add slash if not existant in base url #73
Conversation
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.
LGTM. Thanks!
tsp/tsp_client.py
Outdated
@@ -67,7 +67,7 @@ def __init__(self, base_url): | |||
''' | |||
Constructor | |||
''' | |||
self.base_url = base_url | |||
self.base_url = base_url + '/' if not base_url.endswith('/') else base_url |
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.
can this be inverted... I think it makes it easier to read:
self.base_url = base_url if base_url.endswith('/') else base_url + '/'
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.
You're right, done !
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 would like some tests.
This adds a slash if one is not added in the configured value. It removes one possibility of user error. Signed-off-by: Arnaud Fiorini <[email protected]>
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!
This adds a slash if one is not added in the configured value. It removes one possibility of user error.