[telepathy-gabble/master] bytestream.py: use hashlib instead of the sha module

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue May 5 10:22:22 PDT 2009


---
 tests/twisted/bytestream.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/twisted/bytestream.py b/tests/twisted/bytestream.py
index 78ee754..b5a2d68 100644
--- a/tests/twisted/bytestream.py
+++ b/tests/twisted/bytestream.py
@@ -1,5 +1,5 @@
 import base64
-import sha
+import hashlib
 import sys
 import random
 import socket
@@ -219,7 +219,7 @@ class BytestreamS5B(Bytestream):
     def _compute_hash_domain(self):
         # sha-1(sid + initiator + target)
         unhashed_domain = self.stream_id + self.initiator + self.target
-        return sha.new(unhashed_domain).hexdigest()
+        return hashlib.sha1(unhashed_domain).hexdigest()
 
     def _wait_connect_cmd(self):
         event = self.q.expect('s5b-data-received', transport=self.transport)
-- 
1.5.6.5




More information about the telepathy-commits mailing list