Skip to content

Conversation

Taar
Copy link
Contributor

@Taar Taar commented Jun 26, 2013

It turns out that urlparse.urljoin can't join urls without a schema. So i've added a check to OAuthRemoteApp to check base_url to see if it is in fact has a valid http schema.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format is not available in Python 2.6

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>>> '{}'.format('foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: zero length field name in format

It will always be ValueError.

@lepture
Copy link
Owner

lepture commented Jun 28, 2013

@Taar Sorry for the delay. Actually, I don't think that we need to verify the base url, it is the developer's job to make sure that it works properly.

@Taar
Copy link
Contributor Author

Taar commented Jun 28, 2013

@lepture It's not really for validation but rather informing the developer that they've provided a bad url. urlparse.urljoin won't return the expected url if the base_url doesn't have a http scheme. It throws an error saying it can't resolve the url. I just don't think the stack trance is intuitive enough.

@lepture
Copy link
Owner

lepture commented Jun 28, 2013

@Taar I'd like to add a note on documentation instead of adding the code. Still, I think the developer should make sure himself.

@Taar
Copy link
Contributor Author

Taar commented Jun 28, 2013

@lepture Having something in the documentation would definitely help. I'll look into adding that in.

@Taar Taar closed this Jun 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants