summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2000-01-21 20:30:51 +0000
committerbwarsaw2000-01-21 20:30:51 +0000
commit13666f2203de40d56e86e257871102c3c1985c38 (patch)
treec2392048c093d888070b52fb5d2c0cf5ce06cd45
parentb3dbcdbc3b5fe612ab29b2af13fb56c11a2e7e89 (diff)
downloadmailman-13666f2203de40d56e86e257871102c3c1985c38.tar.gz
mailman-13666f2203de40d56e86e257871102c3c1985c38.tar.zst
mailman-13666f2203de40d56e86e257871102c3c1985c38.zip
main(): Handle the case where the environment has no PATH_INFO
variable.
-rw-r--r--Mailman/Cgi/handle_opts.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Mailman/Cgi/handle_opts.py b/Mailman/Cgi/handle_opts.py
index da3a4cefe..5942ad6d4 100644
--- a/Mailman/Cgi/handle_opts.py
+++ b/Mailman/Cgi/handle_opts.py
@@ -44,8 +44,11 @@ def PrintResults(mlist, operation, doc, results):
def main():
doc = Document()
- path = os.environ['PATH_INFO']
- parts = Utils.GetPathPieces(path)
+ path = os.environ.get('PATH_INFO')
+ if path:
+ parts = Utils.GetPathPieces(path)
+ else:
+ parts = []
if len(parts) < 2:
doc.AddItem(Header(2, "Error"))