Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: Tools/TestResultServer/handlers/buildershandler.py

Issue 26601003: Fix get_latest_build to return actual latest build (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove redundant test. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Tools/TestResultServer/handlers/buildershandler_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/TestResultServer/handlers/buildershandler.py
diff --git a/Tools/TestResultServer/handlers/buildershandler.py b/Tools/TestResultServer/handlers/buildershandler.py
index 966c9c728a373a88776b66d7091c1f5f00f02660..1d0bd62c3f0756ba299bc3eb05f7921d9785b920 100644
--- a/Tools/TestResultServer/handlers/buildershandler.py
+++ b/Tools/TestResultServer/handlers/buildershandler.py
@@ -90,7 +90,8 @@ def get_latest_build(build_data):
latest_cached_builds = set(cached_builds) - set(current_builds)
if len(latest_cached_builds) != 0:
- latest_build = list(latest_cached_builds)[-1]
+ latest_cached_builds = sorted(list(latest_cached_builds))
+ latest_build = latest_cached_builds[-1]
elif len(current_builds) != 0:
latest_build = current_builds[0]
else:
« no previous file with comments | « no previous file | Tools/TestResultServer/handlers/buildershandler_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698