Skip to content

Commit

Permalink
Merge pull request #474 from jdufresne/bytes-warnings
Browse files Browse the repository at this point in the history
Fix BytesWarning issued when using a string placeholder for bytes object
  • Loading branch information
thedrow committed Jul 30, 2017
2 parents bbc9b04 + 4095289 commit 103a951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauthlib/oauth1/rfc5849/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def escape(u):
"""
if not isinstance(u, unicode_type):
raise ValueError('Only unicode objects are escapable. ' +
'Got %s of type %s.' % (u, type(u)))
'Got %r of type %s.' % (u, type(u)))
# Letters, digits, and the characters '_.-' are already treated as safe
# by urllib.quote(). We need to add '~' to fully support rfc5849.
return quote(u, safe=b'~')
Expand Down

0 comments on commit 103a951

Please sign in to comment.