From d326aaf39fc534ebc95b6f17597926dd0e0f438f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Allard?= Date: Tue, 16 Dec 2014 10:02:58 +0100 Subject: [PATCH] We want the first PrevSuccessfullBuild, not the last one ! This is part of TRAC-3071 --- master/buildbot/db/builds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master/buildbot/db/builds.py b/master/buildbot/db/builds.py index 3201411d83f..bb46a1b3054 100644 --- a/master/buildbot/db/builds.py +++ b/master/buildbot/db/builds.py @@ -72,7 +72,7 @@ def getPrevSuccessfulBuild(self, builderid, number, ssBuild): matchssBuild = set([(ss['repository'], ss['branch'], ss['codebase']) for ss in ssBuild]) - while True: + while rv is None: # Get some recent successfull builds on the same builder prevBuilds = yield self._getRecentBuilds(whereclause=((tbl.c.builderid == builderid) & (tbl.c.number < number) &