Avoid DeprecationWarning with Python 2.6+

This commit is contained in:
Bernardo Damele 2009-01-22 23:53:01 +00:00
parent 193482a62b
commit a8d57bb031
3 changed files with 9 additions and 3 deletions

View File

@ -116,6 +116,9 @@ Sven Schluter <sschlueter@netzwerk.cc>
for providing with a patch for waiting a number of seconds between
each HTTP request
Uemit Seren <uemit.seren@gmail.com>
for reporting a minor adjustment when running with python 2.6
Sumit Siddharth <sid@notsosecure.com>
for providing me with ideas on the implementation on a couple of
features

View File

@ -23,9 +23,13 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
"""
try:
import md5
import sha
except DeprecationWarning, _:
from hashlib import md5
from hashlib import sha
import md5
import sha
import struct
import urllib

View File

@ -25,7 +25,6 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import httplib
import md5
import re
import socket
import time