This fixes the md5 deprecation warning by importing hashlib conditionally if
it's available.
Tested & works with Python 2.6.
--
Jeremy
Index: py/Boinc/tools.py
===================================================================
--- py/Boinc/tools.py (revision 20121)
+++ py/Boinc/tools.py (working copy)
@@ -1,8 +1,15 @@
## $Id$
import configxml
-import os, md5, shutil, binascii, filecmp
+try:
+ # Use the new hashlib if available
+ from hashlib import md5
+except:
+ import md5
+
+import os, shutil, binascii, filecmp
+
def check_immutable(src, dst):
if not os.path.exists(dst):
return
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.