Support for Python 2.4:
- Use md5.md5 when hashlib.md5 is not available
This commit is contained in:
parent
76cd7d238f
commit
f3bdb7257c
|
@ -25,7 +25,10 @@ from xml.dom import minidom as DOM
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import hashlib
|
try:
|
||||||
|
from hashlib import md5
|
||||||
|
except:
|
||||||
|
from md5 import md5
|
||||||
import threading
|
import threading
|
||||||
from Queue import Queue
|
from Queue import Queue
|
||||||
|
|
||||||
|
@ -280,7 +283,7 @@ def speedtest():
|
||||||
'recommendedserverid=%s' % best['id'],
|
'recommendedserverid=%s' % best['id'],
|
||||||
'accuracy=%s' % 1,
|
'accuracy=%s' % 1,
|
||||||
'serverid=%s' % best['id'],
|
'serverid=%s' % best['id'],
|
||||||
'hash=%s' % hashlib.md5('%s-%s-%s-%s' %
|
'hash=%s' % md5('%s-%s-%s-%s' %
|
||||||
(ping, ulspeedk, dlspeedk, '297aae72')
|
(ping, ulspeedk, dlspeedk, '297aae72')
|
||||||
).hexdigest()]
|
).hexdigest()]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue