summaryrefslogtreecommitdiff
path: root/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch')
-rw-r--r--net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch b/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch
new file mode 100644
index 00000000000..4f981adedbb
--- /dev/null
+++ b/net-nntp/hellanzb/files/hellanzb-0.13-python_26_fixes.patch
@@ -0,0 +1,90 @@
+https://bugs.gentoo.org/show_bug.cgi?id=262881
+
+Index: Hellanzb/Growl.py
+===================================================================
+--- Hellanzb/Growl.py (Revision 1094)
++++ Hellanzb/Growl.py (Arbeitskopie)
+@@ -7,7 +7,13 @@
+ __contributors__ = "Ingmar J Stein (Growl Team)"
+
+ import struct
+-import md5
++
++# The md5 module has been deprecated as of Python 2.6.
++try:
++ from hashlib import md5
++except ImportError:
++ from md5 import md5
++
+ from socket import AF_INET, SOCK_DGRAM, socket
+
+ GROWL_UDP_PORT=9887
+@@ -51,7 +57,7 @@
+ self.data += encoded
+ for default in self.defaults:
+ self.data += struct.pack("B", default)
+- self.checksum = md5.new()
++ self.checksum = md5()
+ self.checksum.update(self.data)
+ if self.password:
+ self.checksum.update(self.password)
+@@ -89,7 +95,7 @@
+ self.data += self.title
+ self.data += self.description
+ self.data += self.application
+- self.checksum = md5.new()
++ self.checksum = md5()
+ self.checksum.update(self.data)
+ if password:
+ self.checksum.update(password)
+Index: Hellanzb/Util.py
+===================================================================
+--- Hellanzb/Util.py (Revision 1094)
++++ Hellanzb/Util.py (Arbeitskopie)
+@@ -28,9 +28,6 @@
+
+ class FatalError(Exception):
+ """ An error that will cause the program to exit """
+- def __init__(self, message):
+- self.args = [message]
+- self.message = message
+
+ class EmptyForThisPool(Empty):
+ """ The queue is empty in terms of our current serverPool, but there are still segments to
+Index: Hellanzb/HellaXMLRPC/HtPasswdAuth.py
+===================================================================
+--- Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Revision 1094)
++++ Hellanzb/HellaXMLRPC/HtPasswdAuth.py (Arbeitskopie)
+@@ -8,7 +8,13 @@
+ (c) Copyright 2005 Philip Jenvey
+ [See end of file]
+ """
+-import md5
++
++# The md5 module has been deprecated as of Python 2.6.
++try:
++ from hashlib import md5
++except ImportError:
++ from md5 import md5
++
+ from twisted.web import static
+ from twisted.web.resource import Resource
+
+@@ -70,7 +76,7 @@
+
+ self.user = user
+
+- m = md5.new()
++ m = md5()
+ m.update(password)
+ del password
+ self.passwordDigest = m.digest()
+@@ -90,7 +96,7 @@
+ def authenticateUser(self, request):
+ username, password = request.getUser(), request.getPassword()
+
+- m = md5.new()
++ m = md5()
+ m.update(password)
+
+ authenticated = username == self.user and self.passwordDigest == m.digest()