summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/utils.py
diff options
context:
space:
mode:
authorJoseph Tate <joseph@crunch.io>2015-04-16 10:25:22 -0400
committerJoseph Tate <joseph@crunch.io>2015-04-20 03:02:58 -0400
commita41f4fb4d26995bcadfc26540ad84a84b0e10e0d (patch)
tree64c5f78d5b4411749c5d311700c115657124aebf /oauthlib/oauth2/rfc6749/utils.py
parent1be2f1cde1ee003d33f5445bb60642801ff7102b (diff)
downloadoauthlib-a41f4fb4d26995bcadfc26540ad84a84b0e10e0d.tar.gz
Add the broken scope to the ValueError exception for easier debugging, add test for failure case.
Diffstat (limited to 'oauthlib/oauth2/rfc6749/utils.py')
-rw-r--r--oauthlib/oauth2/rfc6749/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/oauthlib/oauth2/rfc6749/utils.py b/oauthlib/oauth2/rfc6749/utils.py
index 49c3a2f..870ac32 100644
--- a/oauthlib/oauth2/rfc6749/utils.py
+++ b/oauthlib/oauth2/rfc6749/utils.py
@@ -27,7 +27,7 @@ def list_to_scope(scope):
elif isinstance(scope, (set, tuple, list)):
return " ".join([unicode_type(s) for s in scope])
else:
- raise ValueError("Invalid scope, must be string or list.")
+ raise ValueError("Invalid scope (%s), must be string, tuple, set, or list." % scope)
def scope_to_list(scope):