~ulrith/mailman/russian-2.1.20

« back to all changes in this revision

Viewing changes to Mailman/Cgi/create.py

  • Committer: Barry Warsaw
  • Date: 2008-11-13 04:02:29 UTC
  • Revision ID: barry@list.org-20081113040229-10pzc4jrxycl9p2d
Apply Heiko Rommel's patch for hashlib deprecation warnings for bug 293178.
I've modified the patch to improve some of the stylistic issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
 
1
# Copyright (C) 2001-2008 by the Free Software Foundation, Inc.
2
2
#
3
3
# This program is free software; you can redistribute it and/or
4
4
# modify it under the terms of the GNU General Public License
21
21
import os
22
22
import signal
23
23
import cgi
24
 
import sha
25
24
from types import ListType
26
25
 
27
26
from Mailman import mm_cfg
31
30
from Mailman import i18n
32
31
from Mailman.htmlformat import *
33
32
from Mailman.Logging.Syslog import syslog
 
33
from Mailman.Utils import sha_new
34
34
 
35
35
# Set up i18n
36
36
_ = i18n._
180
180
        # Install the emergency shutdown signal handler
181
181
        signal.signal(signal.SIGTERM, sigterm_handler)
182
182
 
183
 
        pw = sha.new(password).hexdigest()
 
183
        pw = sha_new(password).hexdigest()
184
184
        # Guarantee that all newly created files have the proper permission.
185
185
        # proper group ownership should be assured by the autoconf script
186
186
        # enforcing that all directories have the group sticky bit set