summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-08-17 15:48:17 +0000
committerbwarsaw2001-08-17 15:48:17 +0000
commit3be87fbbd54380cf0ea0b32bb3084610426d6567 (patch)
treebf6b2ff6a610ae03b3ace6f13dc246e4bef9207d
parent8102e5ebb63915c3d25806c611edaaccb4a164a8 (diff)
downloadmailman-3be87fbbd54380cf0ea0b32bb3084610426d6567.tar.gz
mailman-3be87fbbd54380cf0ea0b32bb3084610426d6567.tar.zst
mailman-3be87fbbd54380cf0ea0b32bb3084610426d6567.zip
main(): When opening the DBFILE for locking, use the `w' flag so that
we don't bomb out if the file doesn't exist yet. This lets us recommend bin/genaliases as the way to initialize things instead of `touch data/aliases.db' which seems to not work for some people.
-rw-r--r--bin/genaliases2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/genaliases b/bin/genaliases
index 0bd842836..782788482 100644
--- a/bin/genaliases
+++ b/bin/genaliases
@@ -72,7 +72,7 @@ def main():
# Overwrite the current file contents, since we're going to be adding
# all new entries. See the discussion in Mailman/MTA/Postfix.py for
# why we do the locking this way.
- lockfp = open(Postfix.DBFILE)
+ lockfp = open(Postfix.DBFILE, 'w')
fcntl.flock(lockfp.fileno(), fcntl.LOCK_EX)
db = dbhash.open(Postfix.DBFILE, 'n')
fp = open(Postfix.TEXTFILE, 'w')