Commit 497492a6 authored by Rafael Monnerat's avatar Rafael Monnerat

Use new connection and get result when try to create new site

parent 60e67974
...@@ -22,6 +22,9 @@ result = zope_connection.getresponse() ...@@ -22,6 +22,9 @@ result = zope_connection.getresponse()
if result.status == 204: # and (result.read() == "False"): if result.status == 204: # and (result.read() == "False"):
# Use a new connection
zope_connection = httplib.HTTPConnection(host)
# Create the expected ERP5 instance # Create the expected ERP5 instance
zope_connection.request( zope_connection.request(
'POST', '/manage_addProduct/ERP5/manage_addERP5Site', 'POST', '/manage_addProduct/ERP5/manage_addERP5Site',
...@@ -35,4 +38,8 @@ if result.status == 204: # and (result.read() == "False"): ...@@ -35,4 +38,8 @@ if result.status == 204: # and (result.read() == "False"):
# Wait for the erp5 response, to prevent multiple requests # Wait for the erp5 response, to prevent multiple requests
# been done by the same script. # been done by the same script.
result = zope_connection.getresponse() result = zope_connection.getresponse()
# Read result make sure the site really finished to
#created the ERP5 site.
result.read()
print "ERP5 site created." print "ERP5 site created."
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