summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/GenerateBuildTestAndStagingReport.py4
-rw-r--r--scripts/GeneratePostPublishReport.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/GenerateBuildTestAndStagingReport.py b/scripts/GenerateBuildTestAndStagingReport.py
index fb8874543e..791c346f46 100644
--- a/scripts/GenerateBuildTestAndStagingReport.py
+++ b/scripts/GenerateBuildTestAndStagingReport.py
@@ -47,7 +47,9 @@ def getTestStatusHtml():
return createTableRow(traffic_light.format(color="black"), "Test status: unable to retrieve status of tests")
else:
test_failures_json = test_failures_request.json()
- if test_failures_json["count"] == 0:
+ # nowadays the responds doesn't contain count keyword when the build is successful
+ # while count word can be found when build fails
+ if "count" not in test_failures_json:
return createTableRow(traffic_light.format(color="green"), "Test status: all tests passing")
else:
return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, <a href={}>check the build report</a>".format(buildResultUrl))
diff --git a/scripts/GeneratePostPublishReport.py b/scripts/GeneratePostPublishReport.py
index 4b11daf754..12ed7cf883 100644
--- a/scripts/GeneratePostPublishReport.py
+++ b/scripts/GeneratePostPublishReport.py
@@ -33,7 +33,7 @@ def checkArchetypeMetaData(archetypeMetadataUrl, version):
if archetype_metadata_request.status_code != 200:
return createTableRow(traffic_light.format(color="black"), "Check archetype metadata: <a href='{url}'>unable to retrieve metadata from {url}</a>".format(url=archetypeMetadataUrl))
else:
- if "version=\"{version}\"".format(version=version) in archetype_metadata_request.content:
+ if "version=\"{version}\"".format(version=version) in archetype_metadata_request.text:
return createTableRow(traffic_light.format(color="green"), "Check archetype metadata: <a href='{url}'>metadata is correct for {url}</a>".format(url=archetypeMetadataUrl))
else:
return createTableRow(traffic_light.format(color="red"), "Check archetype metadata: <a href='{url}'>metadata seems to be incorrect for {url}</a>".format(url=archetypeMetadataUrl))
@@ -66,5 +66,5 @@ content += createTableRow("", "<a href=\"https://github.com/vaadin/framework/rel
content += "</table></body></html>"
-with open("result/report.html", "wb") as f:
+with open("result/report.html", "w") as f:
f.write(content)