mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-29 10:18:30 +00:00
Fix for deprecation warning when used with python 2.6
This commit is contained in:
parent
1aafec7fb6
commit
3b48f626c0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=264145
@ -6,6 +6,7 @@
|
||||
|
||||
PORTNAME= pebrot
|
||||
PORTVERSION= 0.8.9
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= net-im
|
||||
MASTER_SITES= SF
|
||||
|
||||
|
29
net-im/pebrot/files/patch-MSN.py
Normal file
29
net-im/pebrot/files/patch-MSN.py
Normal file
@ -0,0 +1,29 @@
|
||||
--- pypebrot/MSN.py.orig 2009-01-28 05:21:19.000000000 +0800
|
||||
+++ pypebrot/MSN.py 2010-11-06 16:09:40.000000000 +0800
|
||||
@@ -4,7 +4,7 @@
|
||||
import os
|
||||
import re
|
||||
import socket
|
||||
-import md5
|
||||
+import hashlib
|
||||
import urllib
|
||||
import select
|
||||
import errno
|
||||
@@ -729,7 +729,7 @@
|
||||
self.send( 'CHG', '%s\r\n' % state )
|
||||
|
||||
def challenge( self, msg ):
|
||||
- chunk= md5.new( msg.fields['hash']+ 'Q1P7W2E4J9R8U3S5' ).hexdigest()
|
||||
+ chunk= hashlib.md5( msg.fields['hash']+ 'Q1P7W2E4J9R8U3S5' ).hexdigest()
|
||||
self.send( 'QRY', 'msmsgs@msnmsgr.com 32\r\n%s' % chunk )
|
||||
|
||||
def ping( self ):
|
||||
@@ -1107,7 +1107,7 @@
|
||||
elif ( msg.type == 'USR' ):
|
||||
if msg.fields['type'] == 'MD5':
|
||||
hash= msg.fields['arg2']
|
||||
- chunk= md5.new( hash + self.passwd ).hexdigest()
|
||||
+ chunk= hashlib.md5( hash + self.passwd ).hexdigest()
|
||||
self.send( 'USR', 'MD5 S %s\r\n' % chunk )
|
||||
elif msg.fields['type'] == 'TWN':
|
||||
text= split(msg.st)[4]
|
Loading…
Reference in New Issue
Block a user