diff --git a/roundup/cgi/client.py b/roundup/cgi/client.py
index 481384c36e1c4835c5a2277863998daf84b32ebf..4275c8739bb2d4fbcdeb72a0115c0327540a0135 100644 (file)
--- a/roundup/cgi/client.py
+++ b/roundup/cgi/client.py
-# $Id: client.py,v 1.31 2002-09-12 07:00:41 richard Exp $
+# $Id: client.py,v 1.32 2002-09-13 00:08:44 richard Exp $
__doc__ = """
WWW request handler (also used in the stand-alone server).
self.response_code = 200
def main(self):
+ ''' Wrap the real main in a try/finally so we always close off the db.
+ '''
+ try:
+ self.inner_main()
+ finally:
+ if hasattr(self, 'db'):
+ self.db.close()
+
+ def inner_main(self):
''' Process a request.
The most common requests are handled like so: