From 82ed0668ce15834e49055b4503483c6602142e5a Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 23 Nov 2017 09:39:51 -0800 Subject: Ignore missing .db files when updating group and mode. --- Mailman/MTA/Postfix.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Mailman/MTA') diff --git a/Mailman/MTA/Postfix.py b/Mailman/MTA/Postfix.py index b829ad6e..6fa3f14a 100644 --- a/Mailman/MTA/Postfix.py +++ b/Mailman/MTA/Postfix.py @@ -56,7 +56,12 @@ def _update_maps(): if (stat[ST_MODE] & targetmode) <> targetmode: os.chmod(file, stat[ST_MODE] | targetmode) dbfile = file + '.db' - stat = os.stat(dbfile) + try: + stat = os.stat(dbfile) + except OSError, e: + if e.errno <> errno.ENOENT: + raise + return if (stat[ST_MODE] & targetmode) <> targetmode: os.chmod(dbfile, stat[ST_MODE] | targetmode) user = mm_cfg.MAILMAN_USER -- cgit v1.2.3