Commit c6877aff authored by Benjamin Blanc's avatar Benjamin Blanc

erp5_bootstrap: add logs

parent 1af60675
...@@ -20,6 +20,7 @@ header_dict = {'Authorization': 'Basic %%s' %% \ ...@@ -20,6 +20,7 @@ header_dict = {'Authorization': 'Basic %%s' %% \
base64.encodestring('%%s:%%s' %% (user, password)).strip()} base64.encodestring('%%s:%%s' %% (user, password)).strip()}
def getConnection(): def getConnection():
print "Getting new connection"
if protocol == 'https': if protocol == 'https':
return httplib.HTTPSConnection(host) return httplib.HTTPSConnection(host)
elif protocol == 'http': elif protocol == 'http':
...@@ -28,6 +29,7 @@ def getConnection(): ...@@ -28,6 +29,7 @@ def getConnection():
raise ValueError("Protocol not implemented") raise ValueError("Protocol not implemented")
def testIfExist(page, unexcepted_content="Site Error"): def testIfExist(page, unexcepted_content="Site Error"):
print "Test if %%s exists" %%(page)
zope_connection = getConnection() zope_connection = getConnection()
zope_connection.request('GET', '/%%s/%%s' %%(site_id, page)) zope_connection.request('GET', '/%%s/%%s' %%(site_id, page))
result = zope_connection.getresponse() result = zope_connection.getresponse()
...@@ -35,6 +37,7 @@ def testIfExist(page, unexcepted_content="Site Error"): ...@@ -35,6 +37,7 @@ def testIfExist(page, unexcepted_content="Site Error"):
def waitFor0PendingActivities(): def waitFor0PendingActivities():
# TODO: tolerate 1 pending activities ? (mail server...) # TODO: tolerate 1 pending activities ? (mail server...)
print "waitFor0PendingActivities.."
start_time = time.time() start_time = time.time()
while MAX_INSTALLATION_TIME > time.time()-start_time: while MAX_INSTALLATION_TIME > time.time()-start_time:
zope_connection = getConnection() zope_connection = getConnection()
......
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