~msapiro/mailman/topics

« back to all changes in this revision

Viewing changes to bin/genaliases

  • Committer: Mark Sapiro
  • Date: 2014-12-03 23:47:23 UTC
  • mfrom: (1006.1.356 2.2)
  • Revision ID: mark@msapiro.net-20141203234723-3pcwx85xua4n84yx
Merged the 2.2 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! @PYTHON@
2
2
#
3
 
# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
 
3
# Copyright (C) 2001-2011 by the Free Software Foundation, Inc.
4
4
#
5
5
# This program is free software; you can redistribute it and/or
6
6
# modify it under the terms of the GNU General Public License
79
79
    if args:
80
80
        usage(1)
81
81
 
 
82
    if not mm_cfg.MTA:
 
83
        mta = repr(mm_cfg.MTA)
 
84
        usage(2, _(
 
85
            "genaliases can't do anything useful with mm_cfg.MTA = %(mta)s."
 
86
             ))
 
87
 
82
88
    # Import the MTA specific module
83
89
    modulename = 'Mailman.MTA.' + mm_cfg.MTA
84
90
    __import__(modulename)
107
113
                    # Be verbose for only the first printed list
108
114
                    quiet = True
109
115
    finally:
 
116
        lock.unlock(unconditionally=True)
 
117
        # Postfix has not been updating the maps. This call will do it.
 
118
        MTA.create(None, quiet=True)
110
119
        os.umask(omask)
111
 
        lock.unlock(unconditionally=True)
112
120
 
113
121
 
114
122