From 68a23611409f019e6a9fa4589f8df197a92e39a0 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Mon, 4 Sep 2017 22:00:49 -0400 Subject: [PATCH] Subtracting 1 from try build count on mailnotifier --- master.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/master.cfg b/master.cfg index d69e20f..cb1b0ec 100644 --- a/master.cfg +++ b/master.cfg @@ -445,7 +445,9 @@ send to the gdb-testers mailing list.""" con = sqlite3.connect (db_file) c = con.cursor () c.execute ('SELECT COUNT(*) FROM logs WHERE commitid = "%s" AND branch = "%s" AND trysched = 1' % (sourcestamp.revision, branch)) - count = int (c.fetchone ()[0]) + # We subtract one here because the "try" has been already stored + # into the db. + count = int (c.fetchone ()[0]) - 1 con.close () try_to = build.getReason ().strip ("'try' job by user ") @@ -454,7 +456,7 @@ send to the gdb-testers mailing list.""" istrysched = True, try_to = try_to, try_count = count) # Subject - subj = "Try Build on %s, branch %s" % (name, branch) + subj = "Try Build #%d on %s, branch %s" % (count, name, branch) # Body text = ""