8000 Import parse_qs from cgi if needed · Stackdriver/twilio-python@6a3be2c · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Commit 6a3be2c

Browse files
committed
Import parse_qs from cgi if needed
Python 2.5 doesn't have a parse_qs method in urlparse.
1 parent bbb814f commit 6a3be2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

twilio/rest/resources.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
from twilio import TwilioException
66
from twilio import TwilioRestException
77
from urllib import urlencode
8-
from urlparse import urlparse, parse_qs
8+
from urlparse import urlparse
9+
10+
try:
11+
from urlparse import parse_qs
12+
except ImportError:
13+
from cgi import parse_qs
914

1015
# import json
1116
try:

0 commit comments

Comments
 (0)
0