comparison roundup/anypy/vendored/cgi.py @ 8528:fed0f839c260

fix: replace except: with except Exception: (by haosenwang1018@github) Remove bare 'except:' statements replace with 'except Exception'. In roundup_xmlrpc_server.py I changed Exception to BaseException so the database gets closed on signals as well. The rest of the changes do not look like they affect data integrity and are commited as supplied.
author John Rouillard <rouilj@ieee.org>
date Thu, 26 Feb 2026 09:46:02 -0500
parents 185335b2301b
children
comparison
equal deleted inserted replaced
8527:d4a43d9da8ef 8528:fed0f839c260
868 exec("testing print_exception() -- <I>italics?</I>") 868 exec("testing print_exception() -- <I>italics?</I>")
869 def g(f=f): 869 def g(f=f):
870 f() 870 f()
871 print("<H3>What follows is a test, not an actual exception:</H3>") 871 print("<H3>What follows is a test, not an actual exception:</H3>")
872 g() 872 g()
873 except: 873 except Exception:
874 print_exception() 874 print_exception()
875 875
876 print("<H1>Second try with a small maxlen...</H1>") 876 print("<H1>Second try with a small maxlen...</H1>")
877 877
878 global maxlen 878 global maxlen
881 form = FieldStorage() # Replace with other classes to test those 881 form = FieldStorage() # Replace with other classes to test those
882 print_directory() 882 print_directory()
883 print_arguments() 883 print_arguments()
884 print_form(form) 884 print_form(form)
885 print_environ(environ) 885 print_environ(environ)
886 except: 886 except Exception:
887 print_exception() 887 print_exception()
888 888
889 def print_exception(type=None, value=None, tb=None, limit=None): 889 def print_exception(type=None, value=None, tb=None, limit=None):
890 if type is None: 890 if type is None:
891 type, value, tb = sys.exc_info() 891 type, value, tb = sys.exc_info()

Roundup Issue Tracker: http://roundup-tracker.org/