diff options
| author | bwarsaw | 2001-05-18 19:20:26 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-05-18 19:20:26 +0000 |
| commit | 6810a3d63f20fa02ecbaf94ad812bb2cab47703d (patch) | |
| tree | d93c967ef7298e9dbdb10c5d0f2c71861cf3f095 | |
| parent | bcac4f1735b29a14c8001d6b2c9f5b16a7b5c6cb (diff) | |
| download | mailman-6810a3d63f20fa02ecbaf94ad812bb2cab47703d.tar.gz mailman-6810a3d63f20fa02ecbaf94ad812bb2cab47703d.tar.zst mailman-6810a3d63f20fa02ecbaf94ad812bb2cab47703d.zip | |
| -rw-r--r-- | Mailman/Archiver/HyperDatabase.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Mailman/Archiver/HyperDatabase.py b/Mailman/Archiver/HyperDatabase.py index e1a82652d..da9e89261 100644 --- a/Mailman/Archiver/HyperDatabase.py +++ b/Mailman/Archiver/HyperDatabase.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001 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 @@ -29,7 +29,6 @@ import errno # import pipermail from Mailman import LockFile -from Mailman.Utils import mkdir CACHESIZE = pipermail.CACHESIZE @@ -241,10 +240,14 @@ class HyperDatabase(pipermail.Database): return self.__closeIndices() arcdir = os.path.join(self.basedir, 'database') - try: - mkdir(arcdir, mode=02770) - except os.error: - pass + omask = os.umask(0) + try: + try: + os.mkdir(arcdir, mode=02770) + except OSError, e: + if e.errno <> errno.EEXIST: raise + finally: + os.umask(omask) for i in ('date', 'author', 'subject', 'article', 'thread'): t = DumbBTree(os.path.join(arcdir, archive + '-' + i)) setattr(self, i + 'Index', t) |
