diff options
| author | Barry Warsaw | 2017-04-23 03:11:39 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-04-23 03:11:39 +0000 |
| commit | b2edcaccbcf5778014b16139feb1a8eb6f31183e (patch) | |
| tree | 9d2248f730e98742c65ff07a7fe85ec85e2e5d9c /src/mailman/core/switchboard.py | |
| parent | 23be50d1555977438e295ab219109ee1d934d14a (diff) | |
| parent | 9b7a47dbf92abf9bf6e4226ad4fe7da470c8da5f (diff) | |
| download | mailman-b2edcaccbcf5778014b16139feb1a8eb6f31183e.tar.gz mailman-b2edcaccbcf5778014b16139feb1a8eb6f31183e.tar.zst mailman-b2edcaccbcf5778014b16139feb1a8eb6f31183e.zip | |
Diffstat (limited to 'src/mailman/core/switchboard.py')
| -rw-r--r-- | src/mailman/core/switchboard.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mailman/core/switchboard.py b/src/mailman/core/switchboard.py index 315d564f3..e9e5e95f1 100644 --- a/src/mailman/core/switchboard.py +++ b/src/mailman/core/switchboard.py @@ -167,6 +167,13 @@ class Switchboard: def finish(self, filebase, preserve=False): """See `ISwitchboard`.""" bakfile = os.path.join(self.queue_directory, filebase + '.bak') + # It is possible for a queue entry to be created by a non-Mailman user + # and not be readable by the Mailman user:group. If this happens, we + # get here and the file is a .pck rather than a .bak. + pckfile = os.path.join(self.queue_directory, filebase + '.pck') + if not os.path.isfile(bakfile) and os.path.isfile(pckfile): + # We have a .pck and not a .bak so switch the name for the next. + bakfile = pckfile try: if preserve: bad_dir = config.switchboards['bad'].queue_directory |
