# WSGIController.__call__ dispatches to the Controller method
# the request is routed to. This routing information is
# available in environ['pylons.routes_dict']
# WSGIController.__call__ dispatches to the Controller method
# the request is routed to. This routing information is
# available in environ['pylons.routes_dict']
- return WSGIController.__call__(self, environ, start_response)
+
+ # Insert any code to be run per request here.
+
+ try:
+ return WSGIController.__call__(self, environ, start_response)
+ finally:
+ model.Session.remove()