Skip to content

Commit 6b9a7b6

Browse files
committed
For Python2.5 compatibility, fall back to cgi.parse_qs if urlparse.parse_qs is missing.
1 parent cd1f63e commit 6b9a7b6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

github2/request.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import sys
22
import httplib
33
import simplejson
4-
from urlparse import urlparse, parse_qs, urlunparse
4+
from urlparse import urlparse, urlunparse
5+
try:
6+
from urlparse import parse_qs
7+
except ImportError:
8+
from cgi import parse_qs
59
from urllib import urlencode
610

711
GITHUB_URL = "http://github.com"

0 commit comments

Comments
 (0)