[telepathy-butterfly/master] Fix the DeprecationWarning about the sha module

Olivier Le Thanh Duong olivier at lethanh.be
Sun Aug 9 08:00:34 PDT 2009


---
 butterfly/avatars.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/butterfly/avatars.py b/butterfly/avatars.py
index 17e75a6..facc504 100644
--- a/butterfly/avatars.py
+++ b/butterfly/avatars.py
@@ -18,7 +18,7 @@
 
 import logging
 import imghdr
-import sha
+import hashlib
 import dbus
 
 import telepathy
@@ -92,7 +92,7 @@ class ButterflyAvatars(\
         msn_object = papyon.p2p.MSNObject(self.msn_client.profile,
                          len(avatar),
                          papyon.p2p.MSNObjectType.DISPLAY_PICTURE,
-                         sha.new(avatar).hexdigest() + '.tmp',
+                         hashlib.sha1(avatar).hexdigest() + '.tmp',
                          "",
                          data=StringIO.StringIO(avatar))
         self.msn_client.profile.msn_object = msn_object
-- 
1.5.6.5



More information about the telepathy-commits mailing list