Skip to content

Commit

Permalink
Merge pull request #13 from xebialabs-community/finishDate
Browse files Browse the repository at this point in the history
There might be rare cases where a build has no finishDate
  • Loading branch information
jdewinne authored Apr 5, 2019
2 parents a3bd6cf + f2f6595 commit d13c4dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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']),
Expand Down

0 comments on commit d13c4dd

Please sign in to comment.