services/presence/psutils.py: don't bother using sugar.util, it's easier to use hexdigest or sha directly

This commit is contained in:
Simon McVittie 2007-05-29 16:11:07 +01:00
parent 2f8ef7bd3b
commit 9d812430bf

View File

@ -17,12 +17,15 @@
import logging
from string import ascii_letters, digits
try:
from hashlib import sha1
except ImportError:
# Python < 2.5
from sha import new as sha1
import dbus
import gobject
from sugar import util
_logger = logging.getLogger('s-p-s.psutils')
@ -39,7 +42,7 @@ def pubkey_to_keyid(key):
:Returns:
The key ID as a string of hex digits
"""
return util.printable_hash(util._sha_data(key))
return sha1(key).hexdigest()
def escape_identifier(identifier):