From f2f659579bda787676d8a4c632df38fd7510f842 Mon Sep 17 00:00:00 2001 From: Joris De Winne Date: Fri, 5 Apr 2019 09:08:26 -0700 Subject: [PATCH] There might be rare cases where a build has no finishDate --- src/main/resources/teamcity/BuildConfigurationsStatusTile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/teamcity/BuildConfigurationsStatusTile.py b/src/main/resources/teamcity/BuildConfigurationsStatusTile.py index 20bc6c4..ca8ecf9 100644 --- a/src/main/resources/teamcity/BuildConfigurationsStatusTile.py +++ b/src/main/resources/teamcity/BuildConfigurationsStatusTile.py @@ -62,7 +62,7 @@ build_test_occurrences["failureCount"] = failureCount project_status["statuses"].append({"name": build_configuration['name'], "status": build_configuration['builds']['build'][0]['status'], "statusText": build_configuration['builds']['build'][0]['statusText'], - "finishDate": parse(build_configuration['builds']['build'][0]['finishDate']).strftime("%a, %d %b %Y %H:%M:%S"), + "finishDate": parse(build_configuration['builds']['build'][0]['finishDate']).strftime("%a, %d %b %Y %H:%M:%S") if "finishDate" in build_configuration['builds']['build'][0] else "N/A", "problemOccurrences": build_problem_occurrences, "testOccurrences": build_test_occurrences, "buildLog": processed_build_log, "statusUrl": "%s/app/rest/builds/buildType:(id:%s)/statusIcon" % (teamcityServer["url"], build_configuration['id']),