From d22e6908227e9b950165cf2dc29d436ed2667c27 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Sat, 11 Jul 2009 13:07:22 +0000 Subject: [PATCH] md5 and sha module will be deprecated in python 2.6 #266 --- src/sugar/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sugar/util.py b/src/sugar/util.py index e0277349..26bbe837 100644 --- a/src/sugar/util.py +++ b/src/sugar/util.py @@ -22,7 +22,7 @@ UNSTABLE. We have been adding helpers randomly to this module. import os import time -import sha +import hashlib import random import binascii import gettext @@ -42,7 +42,7 @@ def printable_hash(in_hash): def sha_data(data): """sha1 hash some bytes.""" - sha_hash = sha.new() + sha_hash = hashlib.sha1() sha_hash.update(data) return sha_hash.digest()