Commit 5958fb49 authored by Joel Martin's avatar Joel Martin

Python 2.4 compatible imports.

- Fallback to md5 module if hashlib not there.
- Import parse_qsl from cgi where it is in both 2.4 and 2.6
parent c95c24e7
...@@ -14,8 +14,12 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates ...@@ -14,8 +14,12 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
import sys, socket, ssl, struct, traceback import sys, socket, ssl, struct, traceback
import os, resource, errno, signal # daemonizing import os, resource, errno, signal # daemonizing
from base64 import b64encode, b64decode from base64 import b64encode, b64decode
from hashlib import md5 try:
from urlparse import urlsplit, parse_qsl from hashlib import md5
except:
from md5 import md5 # Support python 2.4
from urlparse import urlsplit
from cgi import parse_qsl
settings = { settings = {
'listen_host' : '', 'listen_host' : '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment