aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Pending.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/Pending.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/Pending.py')
-rw-r--r--Mailman/Pending.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Mailman/Pending.py b/Mailman/Pending.py
index 224565b5..e6372eda 100644
--- a/Mailman/Pending.py
+++ b/Mailman/Pending.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-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
@@ -17,13 +17,13 @@
"""Track pending actions which require confirmation."""
import os
-import sha
import time
import errno
import random
import cPickle
from Mailman import mm_cfg
+from Mailman.Utils import sha_new
# Types of pending records
SUBSCRIPTION = 'S'
@@ -72,7 +72,7 @@ class Pending:
while True:
now = time.time()
x = random.random() + now % 1.0 + time.clock() % 1.0
- cookie = sha.new(repr(x)).hexdigest()
+ cookie = sha_new(repr(x)).hexdigest()
# We'll never get a duplicate, but we'll be anal about checking
# anyway.
if not db.has_key(cookie):