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
This commit is contained in:
parent
5e86608503
commit
17af0372fd
@ -14,8 +14,12 @@ as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
||||
import sys, socket, ssl, struct, traceback
|
||||
import os, resource, errno, signal # daemonizing
|
||||
from base64 import b64encode, b64decode
|
||||
from hashlib import md5
|
||||
from urlparse import urlsplit, parse_qsl
|
||||
try:
|
||||
from hashlib import md5
|
||||
except:
|
||||
from md5 import md5 # Support python 2.4
|
||||
from urlparse import urlsplit
|
||||
from cgi import parse_qsl
|
||||
|
||||
settings = {
|
||||
'listen_host' : '',
|
||||
|
Loading…
x
Reference in New Issue
Block a user