aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Queue/Switchboard.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/Queue/Switchboard.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 'Mailman/Queue/Switchboard.py')
-rw-r--r--Mailman/Queue/Switchboard.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py
index 94b8efa0..bd1cd357 100644
--- a/Mailman/Queue/Switchboard.py
+++ b/Mailman/Queue/Switchboard.py
@@ -35,7 +35,6 @@
# needs.
import os
-import sha
import time
import email
import errno
@@ -46,6 +45,7 @@ from Mailman import mm_cfg
from Mailman import Utils
from Mailman import Message
from Mailman.Logging.Syslog import syslog
+from Mailman.Utils import sha_new
# 20 bytes of all bits set, maximum sha.digest() value
shamax = 0xffffffffffffffffffffffffffffffffffffffffL
@@ -118,7 +118,7 @@ class Switchboard:
# this system) and the sha hex digest.
#rcvtime = data.setdefault('received_time', now)
rcvtime = data.setdefault('received_time', now)
- filebase = `rcvtime` + '+' + sha.new(hashfood).hexdigest()
+ filebase = `rcvtime` + '+' + sha_new(hashfood).hexdigest()
filename = os.path.join(self.__whichq, filebase + '.pck')
tmpfile = filename + '.tmp'
# Always add the metadata schema version number