Support hashlib for Python 2.5 and above
commit4b79992a7fb93442b98f9bc2e2cd9752dae523d5
authorThomas Perl <thp@perli.net>
Tue, 23 Dec 2008 10:45:19 +0000 (23 11:45 +0100)
committerThomas Perl <thp@perli.net>
Tue, 23 Dec 2008 10:45:19 +0000 (23 11:45 +0100)
tree554d5800e5826cf02363ef1fd022215b1dfbbd98
parent141ea4a95a05c0d682a4e6541b4553da64b25578
Support hashlib for Python 2.5 and above

Python 2.6 issues a "Warning:" when we use the sha module that
has been deprecated since Python 2.5. The "hashlib" module that
should be used instead is only available in Python 2.5 and above,
so check for the existence and use whichever method we have available
(but prefer hashlib over the older sha module if available).
urlwatch