added my patched version of pyicq-t that should work with python 2.6 and twisted-9
This commit is contained in:
		
							parent
							
								
									f241f85584
								
							
						
					
					
						commit
						d2b9e67fe6
					
				
					 2 changed files with 195 additions and 0 deletions
				
			
		
							
								
								
									
										120
									
								
								net-im/pyicq-t/files/pyicq-t-hashlib.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								net-im/pyicq-t/files/pyicq-t-hashlib.patch
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,120 @@ | |||
| diff -ru pyicqt-0.8.1.5-vanilla/src/avatar.py pyicqt-0.8.1.5/src/avatar.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/avatar.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/avatar.py	2010-01-19 17:53:36.000000000 +0000
 | ||||
| @@ -6,7 +6,7 @@
 | ||||
|  from twisted.words.xish.domish import Element | ||||
|  from debug import LogEvent, INFO, WARN, ERROR | ||||
|  import lang | ||||
| -import sha
 | ||||
| +import hashlib
 | ||||
|  import base64 | ||||
|  import os | ||||
|  import os.path | ||||
| @@ -46,7 +46,7 @@
 | ||||
|  class Avatar: | ||||
|  	""" Represents an Avatar. Does not store the image in memory. """ | ||||
|  	def __init__(self, imageData, avatarCache): | ||||
| -		self.__imageHash = sha.sha(imageData).hexdigest()
 | ||||
| +		self.__imageHash = hashlib.sha1(imageData).hexdigest()
 | ||||
|  		self.__avatarCache = avatarCache | ||||
|   | ||||
|  	def getImageHash(self): | ||||
| diff -ru pyicqt-0.8.1.5-vanilla/src/contact.py pyicqt-0.8.1.5/src/contact.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/contact.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/contact.py	2010-01-19 17:52:43.000000000 +0000
 | ||||
| @@ -8,7 +8,7 @@
 | ||||
|  import config | ||||
|  from debug import LogEvent, INFO, WARN, ERROR | ||||
|  import lang | ||||
| -import sha
 | ||||
| +import hashlib
 | ||||
|  import legacy | ||||
|  import globals | ||||
|  import base64 | ||||
| diff -ru pyicqt-0.8.1.5-vanilla/src/legacy/buddies.py pyicqt-0.8.1.5/src/legacy/buddies.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/legacy/buddies.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/legacy/buddies.py	2010-01-19 17:49:24.000000000 +0000
 | ||||
| @@ -12,7 +12,7 @@
 | ||||
|  import os.path | ||||
|  import binascii | ||||
|  import os.path | ||||
| -import md5
 | ||||
| +import hashlib
 | ||||
|   | ||||
|  X = os.path.sep | ||||
|   | ||||
| @@ -188,7 +188,7 @@
 | ||||
|  				avatarData = avatar.AvatarCache().setAvatar(imgmanip.convertToPNG(iconData)) | ||||
|  				c.updateAvatar(avatarData, push=True) | ||||
|  				if not md5Hash: | ||||
| -					m = md5.new()
 | ||||
| +					m = hashlib.md5()
 | ||||
|  					m.update(iconData) | ||||
|  					md5Hash = m.digest() | ||||
|  				if not numHash: | ||||
| diff -ru pyicqt-0.8.1.5-vanilla/src/legacy/glue.py pyicqt-0.8.1.5/src/legacy/glue.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/legacy/glue.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/legacy/glue.py	2010-01-19 17:49:44.000000000 +0000
 | ||||
| @@ -18,7 +18,7 @@
 | ||||
|  import time | ||||
|  import binascii | ||||
|  import avatar | ||||
| -import md5
 | ||||
| +import hashlib
 | ||||
|  import random | ||||
|   | ||||
|  from twisted.python import log | ||||
| @@ -398,7 +398,7 @@
 | ||||
|  			try: | ||||
|  				self.myavatar = imgmanip.convertToJPG(imageData) | ||||
|  				self.myavatarlen = len(self.myavatar) | ||||
| -				m=md5.new()
 | ||||
| +				m=hashlib.md5()
 | ||||
|  				m.update(self.myavatar) | ||||
|  				self.myavatarsum = m.digest() | ||||
|  				self.myavatarstamp = time.time() | ||||
| diff -ru pyicqt-0.8.1.5-vanilla/src/legacy/icqt.py pyicqt-0.8.1.5/src/legacy/icqt.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/legacy/icqt.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/legacy/icqt.py	2010-01-19 17:50:22.000000000 +0000
 | ||||
| @@ -14,7 +14,7 @@
 | ||||
|  import time | ||||
|  import datetime | ||||
|  import binascii | ||||
| -import md5
 | ||||
| +import hashlib
 | ||||
|  import locale | ||||
|  import struct | ||||
|   | ||||
| diff -ru pyicqt-0.8.1.5-vanilla/src/tlib/oscar.py pyicqt-0.8.1.5/src/tlib/oscar.py
 | ||||
| --- pyicqt-0.8.1.5-vanilla/src/tlib/oscar.py	2009-08-24 12:37:59.000000000 +0000
 | ||||
| +++ pyicqt-0.8.1.5/src/tlib/oscar.py	2010-01-19 17:48:01.000000000 +0000
 | ||||
| @@ -21,7 +21,7 @@
 | ||||
|  from scheduler import Scheduler | ||||
|   | ||||
|  import struct | ||||
| -import md5
 | ||||
| +import hashlib
 | ||||
|  import string | ||||
|  import socket | ||||
|  import random | ||||
| @@ -120,9 +120,9 @@
 | ||||
|      return dict,data | ||||
|   | ||||
|  def encryptPasswordMD5(password,key): | ||||
| -    m=md5.new()
 | ||||
| +    m=hashlib.md5()
 | ||||
|      m.update(key) | ||||
| -    m.update(md5.new(password).digest())
 | ||||
| +    m.update(hashlib.md5(password).digest())
 | ||||
|      m.update("AOL Instant Messenger (SM)") | ||||
|      return m.digest() | ||||
|   | ||||
| @@ -534,7 +534,7 @@
 | ||||
|          self.iconSum = tlvs.get(0xd5,"") | ||||
|   | ||||
|      def updateIcon(self, iconData): | ||||
| -        m=md5.new()
 | ||||
| +        m=hashlib.md5()
 | ||||
|          m.update(iconData) | ||||
|          self.iconSum = m.digest() | ||||
|          log.msg("icon sum is %s" % binascii.hexlify(self.iconSum)) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue