Skip to content
Browse files

Moved import to top

  • Loading branch information...
1 parent a07d520 commit 0b0705bf18b6451e8d1db3804c42f6ace1c3150c @ib-lundgren ib-lundgren committed Apr 26, 2012
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.')

0 comments on commit 0b0705b

Please sign in to comment.
Something went wrong with that request. Please try again.