diff options
author | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-03-02 18:57:16 +0900 |
---|---|---|
committer | Yasuhito FUTATSUKI at POEM <futatuki@poem.co.jp> | 2016-03-02 18:57:16 +0900 |
commit | 3d3ed445c841f40e793e733956ab65287ca5cfe1 (patch) | |
tree | f54b733b0a6a3353cb595d6c4664689ea5bf8a3f /Mailman/MTA/Postfix.py | |
parent | 7bee928877b9771072c32c47912b346b41ce3c35 (diff) | |
parent | 8f22ba21a32701d2efaac0b8b1a1c0a4522912b0 (diff) | |
download | mailman2-3d3ed445c841f40e793e733956ab65287ca5cfe1.tar.gz mailman2-3d3ed445c841f40e793e733956ab65287ca5cfe1.tar.xz mailman2-3d3ed445c841f40e793e733956ab65287ca5cfe1.zip |
Update to lp:mailman/2.1 rev 1629 (no difference against the original branch
Diffstat (limited to 'Mailman/MTA/Postfix.py')
-rw-r--r-- | Mailman/MTA/Postfix.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py index 3f5c9984..8860459e 100644 --- a/Mailman/MTA/Postfix.py +++ b/Mailman/MTA/Postfix.py @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2014 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2016 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 @@ -27,7 +27,7 @@ from stat import * from Mailman import mm_cfg from Mailman import Utils from Mailman import LockFile -from Mailman.i18n import _ +from Mailman.i18n import C_ from Mailman.MTA.Utils import makealiases from Mailman.Logging.Syslog import syslog @@ -358,7 +358,7 @@ def checkperms(state): targetmode = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP for file in ALIASFILE, VIRTFILE: if state.VERBOSE: - print _('checking permissions on %(file)s') + print C_('checking permissions on %(file)s') stat = None try: stat = os.stat(file) @@ -368,9 +368,9 @@ def checkperms(state): if stat and (stat[ST_MODE] & targetmode) <> targetmode: state.ERRORS += 1 octmode = oct(stat[ST_MODE]) - print _('%(file)s permissions must be 066x (got %(octmode)s)'), + print C_('%(file)s permissions must be 066x (got %(octmode)s)'), if state.FIX: - print _('(fixing)') + print C_('(fixing)') os.chmod(file, stat[ST_MODE] | targetmode) else: print @@ -386,7 +386,7 @@ def checkperms(state): raise continue if state.VERBOSE: - print _('checking ownership of %(dbfile)s') + print C_('checking ownership of %(dbfile)s') user = mm_cfg.MAILMAN_USER ownerok = stat[ST_UID] == pwd.getpwnam(user)[2] if not ownerok: @@ -394,10 +394,11 @@ def checkperms(state): owner = pwd.getpwuid(stat[ST_UID])[0] except KeyError: owner = 'uid %d' % stat[ST_UID] - print _('%(dbfile)s owned by %(owner)s (must be owned by %(user)s'), + print C_( + '%(dbfile)s owned by %(owner)s (must be owned by %(user)s'), state.ERRORS += 1 if state.FIX: - print _('(fixing)') + print C_('(fixing)') uid = pwd.getpwnam(user)[2] gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2] os.chown(dbfile, uid, gid) @@ -406,9 +407,9 @@ def checkperms(state): if stat and (stat[ST_MODE] & targetmode) <> targetmode: state.ERRORS += 1 octmode = oct(stat[ST_MODE]) - print _('%(dbfile)s permissions must be 066x (got %(octmode)s)'), + print C_('%(dbfile)s permissions must be 066x (got %(octmode)s)'), if state.FIX: - print _('(fixing)') + print C_('(fixing)') os.chmod(dbfile, stat[ST_MODE] | targetmode) else: print |