aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/Scrubber.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@list.org>2008-11-12 23:02:29 -0500
committerBarry Warsaw <barry@list.org>2008-11-12 23:02:29 -0500
commita86be44b08fe0935fe77d90948b9baad85af3624 (patch)
treecc9b8b20530f1d54975005d19f9a17fddade945d /Mailman/Handlers/Scrubber.py
parent392554b8de4641c8ac9c5ca1e062919a64ecd020 (diff)
downloadmailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.gz
mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.tar.xz
mailman2-a86be44b08fe0935fe77d90948b9baad85af3624.zip
Apply Heiko Rommel's patch for hashlib deprecation warnings for bug 293178.
I've modified the patch to improve some of the stylistic issues.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Scrubber.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 1d5aed92..7f42e5ed 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2008 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -21,7 +21,6 @@ from __future__ import nested_scopes
import os
import re
-import sha
import time
import errno
import binascii
@@ -41,6 +40,7 @@ from Mailman import Message
from Mailman.Errors import DiscardMessage
from Mailman.i18n import _
from Mailman.Logging.Syslog import syslog
+from Mailman.Utils import sha_new
# Path characters for common platforms
pre = re.compile(r'[/\\:]')
@@ -158,7 +158,7 @@ def calculate_attachments_dir(mlist, msg, msgdata):
if msgid is None:
msgid = msg['Message-ID'] = Utils.unique_message_id(mlist)
# We assume that the message id actually /is/ unique!
- digest = sha.new(msgid).hexdigest()
+ digest = sha_new(msgid).hexdigest()
return os.path.join('attachments', datedir, digest[:4] + digest[-4:])