Ticket #266: sugar-266-sugar-toolkit.patch

File sugar-266-sugar-toolkit.patch, 531 bytes (added by alsroot, 15 years ago)
  • src/sugar/util.py

    diff --git a/src/sugar/util.py b/src/sugar/util.py
    index e027734..26bbe83 100644
    a b UNSTABLE. We have been adding helpers randomly to this module. 
    2222
    2323import os
    2424import time
    25 import sha
     25import hashlib
    2626import random
    2727import binascii
    2828import gettext
    def printable_hash(in_hash): 
    4242
    4343def sha_data(data):
    4444    """sha1 hash some bytes."""
    45     sha_hash = sha.new()
     45    sha_hash = hashlib.sha1()
    4646    sha_hash.update(data)
    4747    return sha_hash.digest()
    4848