Commit d307bb9c authored by Malthe Borch's avatar Malthe Borch Committed by Tres Seaver

Ensure that interaction ends, once begun.

Wrap in try-finally.

Cherry-pick c73dfcd1 from master.
parent a2e8e90a
...@@ -167,6 +167,7 @@ def publish(request, module_name, ...@@ -167,6 +167,7 @@ def publish(request, module_name,
notify(PubStart(request)) notify(PubStart(request))
newInteraction() newInteraction()
try:
request.processInputs() request.processInputs()
response = request.response response = request.response
...@@ -206,7 +207,7 @@ def publish(request, module_name, ...@@ -206,7 +207,7 @@ def publish(request, module_name,
if result is not response: if result is not response:
response.setBody(result) response.setBody(result)
finally:
endInteraction() endInteraction()
notify(PubBeforeCommit(request)) notify(PubBeforeCommit(request))
......
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