aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Cgi/private.py
diff options
context:
space:
mode:
authorbwarsaw <>2005-12-30 18:50:08 +0000
committerbwarsaw <>2005-12-30 18:50:08 +0000
commitd44c2c9f011075a7f6b6ffebe22ec3f17dda3a26 (patch)
tree6199ed049dba0f377f628b9c57a08b1ff9c3f500 /Mailman/Cgi/private.py
parent11ba661517e7606f5f38a8be87f68b32bff0afd4 (diff)
downloadmailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.tar.gz
mailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.tar.xz
mailman2-d44c2c9f011075a7f6b6ffebe22ec3f17dda3a26.zip
A cleansing pass, almost entirely cosmetic. Such things as whitespace
normalization, removal of tabs, copyright year updates to changed files, docstring and comment fixes, and usage of True/False. I also made a pass through the NEWS file. One import was reordered, and after this commit I will move the mmdsr.readme file to README.mmdsr. From my perspective, after that we're ready to go. I will port these changes forward to the trunk.
Diffstat (limited to 'Mailman/Cgi/private.py')
-rw-r--r--Mailman/Cgi/private.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py
index 7dcd39ca..35b38dea 100644
--- a/Mailman/Cgi/private.py
+++ b/Mailman/Cgi/private.py
@@ -15,8 +15,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
-"""Provide a password-interface wrapper around private archives.
-"""
+"""Provide a password-interface wrapper around private archives."""
import os
import sys
@@ -136,19 +135,18 @@ def main():
charset = Utils.GetCharSet(mlist.preferred_language)
print 'Content-type: text/html; charset=' + charset + '\n\n'
# Put the original full path in the authorization form, but avoid
- # trailing slash if we're not adding parts. We add it below.
+ # trailing slash if we're not adding parts. We add it below.
action = mlist.GetScriptURL('private', absolute=1)
if parts[1:]:
action = os.path.join(action, SLASH.join(parts[1:]))
- # If we added '/index.html' to true_filename, add a slash to the
- # URL. We need this because we no longer add the trailing slash in
- # the private.html template. It's always OK to test parts[-1]
- # since we've already verified parts[0] is listname.
- # The basic rule is if the post URL (action) is a directory, it must
- # be slash terminated, and not if it's a file. Otherwise, relative
- # links in the target archive page don't work.
- if true_filename.endswith('/index.html') and \
- parts[-1] <> 'index.html':
+ # If we added '/index.html' to true_filename, add a slash to the URL.
+ # We need this because we no longer add the trailing slash in the
+ # private.html template. It's always OK to test parts[-1] since we've
+ # already verified parts[0] is listname. The basic rule is if the
+ # post URL (action) is a directory, it must be slash terminated, but
+ # not if it's a file. Otherwise, relative links in the target archive
+ # page don't work.
+ if true_filename.endswith('/index.html') and parts[-1] <> 'index.html':
action += SLASH
print Utils.maketext(
'private.html',