summaryrefslogtreecommitdiff
path: root/oauthlib/oauth1
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-04-16 14:14:22 -0700
committerJon Dufresne <jon.dufresne@gmail.com>2017-04-16 14:14:22 -0700
commit40952892042c85d08107c009f77790b823fcad3c (patch)
tree68ee616b304774f0af52a9c48609a7463d1cc5a2 /oauthlib/oauth1
parentb6f65f9a06e9981c3306b8a085cd789ed2b56697 (diff)
downloadoauthlib-40952892042c85d08107c009f77790b823fcad3c.tar.gz
Fix BytesWarning issued when using a string placeholder for bytes object
When running tests, fixes warnings of the form: .../oauthlib/oauthlib/oauth1/rfc5849/utils.py:56: BytesWarning: str() on a bytes instance
Diffstat (limited to 'oauthlib/oauth1')
-rw-r--r--oauthlib/oauth1/rfc5849/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/oauth1/rfc5849/utils.py b/oauthlib/oauth1/rfc5849/utils.py
index eafb303..a58372e 100644
--- a/oauthlib/oauth1/rfc5849/utils.py
+++ b/oauthlib/oauth1/rfc5849/utils.py
@@ -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'~')