Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved import to top

  • Loading branch information...
commit 0b0705bf18b6451e8d1db3804c42f6ace1c3150c 1 parent a07d520
@ib-lundgren ib-lundgren authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  oauthlib/oauth1/rfc5849/utils.py
View
2  oauthlib/oauth1/rfc5849/utils.py
@@ -11,6 +11,7 @@
import string
import time
from random import getrandbits, choice
+import re
import urlparse
UNICODE_ASCII_CHARACTER_SET = (string.ascii_letters.decode('ascii') +
@@ -181,7 +182,6 @@ def urldecode(query):
# All encoded values begin with % followed by two hex characters
# correct = %00, %A0, %0A, %FF
# invalid = %G0, %5H, %PO
- import re
invalid_hex = u'%[^0-9A-Fa-f]|%[0-9A-Fa-f][^0-9A-Fa-f]'
if len(re.findall(invalid_hex, query)):
raise ValueError('Invalid hex encoding in query string.')
Please sign in to comment.
Something went wrong with that request. Please try again.