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

Commit 6a9fe32

Browse files
author
bburns
committed
get parse_qs from cgi if not in urlparse to support python 2.5
this method was moved to urlparse in python 2.6 - see http://bugs.python.org/issue600362
1 parent 7179847 commit 6a9fe32

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

httpd.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
except ImportError:
3333
import simplejson as json
3434

35+
# support python 2.5 (parse_qs was moved from cgi to urlparse in python 2.6)
36+
try:
37+
urlparse.parse_qs
38+
except AttributeError:
39+
urlparse.parse_qs = cgi.parse_qs
40+
41+
3542

3643
class MongoServer(HTTPServer):
3744

0 commit comments

Comments
 (0)