This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 326b0b60 Allow for missing path
326b0b60 is described below

commit 326b0b6020c563300ffee4a001663c759d64d49c
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 7 14:32:33 2025 +0000

    Allow for missing path
---
 www/board_minutes.cgi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/www/board_minutes.cgi b/www/board_minutes.cgi
index 7d20cf16..a5028d91 100755
--- a/www/board_minutes.cgi
+++ b/www/board_minutes.cgi
@@ -7,6 +7,7 @@ import os
 import os.path
 import sys
 import re
+import traceback
 
 sys.path.append('/srv/whimsy/tools')
 import boardminutes2html
@@ -63,7 +64,7 @@ def main():
     print("Content-type: text/html\n\n")
 
     try:
-        info = os.environ['PATH_INFO']
+        info = os.environ.get('PATH_INFO', '')
         parts = info.lstrip('/').split('/')
         if parts[-1] == '': # drop trailing empty part
             parts.pop()
@@ -89,7 +90,8 @@ def main():
         else:
             print("Invalid request")
     except Exception as ex:
-        print(ex)
+        print('Sorry, something went wrong')
+        traceback.print_exc()
 
 if __name__ == '__main__':
     main()

Reply via email to