From 3be87fbbd54380cf0ea0b32bb3084610426d6567 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 17 Aug 2001 15:48:17 +0000 Subject: 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. --- bin/genaliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') 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') -- cgit v1.2.3-70-g09d2