From c27f2486e7e76635186c459ab722f289c0c43da1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 11 Jan 2010 06:10:17 +0000 Subject: [PATCH] - fix python deprecation warning (from Jeremy Cowles) svn path=/trunk/boinc/; revision=20122 --- checkin_notes | 6 ++++++ py/Boinc/tools.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 80e08a4d69..a8251c46c7 100644 --- a/checkin_notes +++ b/checkin_notes @@ -264,3 +264,9 @@ David 10 Jan 2010 clientgui/ ViewNotifications.cpp + +David 10 Jan 2010 + - fix python deprecation warning (from Jeremy Cowles) + + py/Boinc/ + tools.py diff --git a/py/Boinc/tools.py b/py/Boinc/tools.py index 4a89ce7f1e..761aae8483 100644 --- a/py/Boinc/tools.py +++ b/py/Boinc/tools.py @@ -1,7 +1,12 @@ ## $Id$ import configxml -import os, md5, shutil, binascii, filecmp +try: + # use 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):