Commit 68812fa0 authored by Shane Hathaway's avatar Shane Hathaway

When retrying after a conflict error, the original ZODB connection needs to

be closed.
parent 03e88384
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__="""Python Object Publisher -- Publish Python objects on web servers __doc__="""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.147 2000/06/02 20:03:25 jim Exp $""" $Id: Publish.py,v 1.148 2001/02/23 20:40:45 shane Exp $"""
__version__='$Revision: 1.147 $'[11:-2] __version__='$Revision: 1.148 $'[11:-2]
import sys, os import sys, os
from string import lower, atoi, rfind, strip from string import lower, atoi, rfind, strip
...@@ -195,13 +195,14 @@ def publish(request, module_name, after_list, debug=0, ...@@ -195,13 +195,14 @@ def publish(request, module_name, after_list, debug=0,
sys.exc_info()[2], sys.exc_info()[2],
) )
newrequest=request.retry() newrequest=request.retry()
request.close() # Free resources held by the request.
try: try:
return publish(newrequest, module_name, after_list, debug) return publish(newrequest, module_name, after_list, debug)
finally: finally:
newrequest.close() newrequest.close()
else: raise else: raise
def publish_module(module_name, def publish_module(module_name,
stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment