diff options
| author | bwarsaw | 2003-01-24 00:18:35 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-01-24 00:18:35 +0000 |
| commit | 7bc7bf6d3d44870b88b8bb01890faae120e18065 (patch) | |
| tree | 25d4f0740bd0d9651dbc67d57ec54317f1fd2e41 /Mailman/Handlers | |
| parent | 0312e4547a1c8098dbffd5f094cb220b362d1d38 (diff) | |
| download | mailman-7bc7bf6d3d44870b88b8bb01890faae120e18065.tar.gz mailman-7bc7bf6d3d44870b88b8bb01890faae120e18065.tar.zst mailman-7bc7bf6d3d44870b88b8bb01890faae120e18065.zip | |
makedirs(): Only twiddle the attachment directory permissions if we
successfully called makedirs().
Diffstat (limited to 'Mailman/Handlers')
| -rw-r--r-- | Mailman/Handlers/Scrubber.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 6cc9aa39b..b5be73dfc 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -326,13 +326,13 @@ def makedirs(dir): # Create all the directories to store this attachment in try: os.makedirs(dir, 02775) + # Unfortunately, FreeBSD seems to be broken in that it doesn't honor + # the mode arg of mkdir(). + def twiddle(arg, dirname, names): + os.chmod(dirname, 02775) + os.path.walk(dir, twiddle, None) except OSError, e: if e.errno <> errno.EEXIST: raise - # Unfortunately, FreeBSD seems to be broken in that it doesn't honor the - # mode arg of mkdir(). - def twiddle(arg, dirname, names): - os.chmod(dirname, 02775) - os.path.walk(dir, twiddle, None) |
