Subtracting 1 from try build count on mailnotifier
This commit is contained in:
parent
8c4345f7e1
commit
68a2361140
1 changed files with 4 additions and 2 deletions
|
@ -445,7 +445,9 @@ send to the gdb-testers mailing list."""
|
||||||
con = sqlite3.connect (db_file)
|
con = sqlite3.connect (db_file)
|
||||||
c = con.cursor ()
|
c = con.cursor ()
|
||||||
c.execute ('SELECT COUNT(*) FROM logs WHERE commitid = "%s" AND branch = "%s" AND trysched = 1' % (sourcestamp.revision, branch))
|
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 ()
|
con.close ()
|
||||||
|
|
||||||
try_to = build.getReason ().strip ("'try' job by user ")
|
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)
|
istrysched = True, try_to = try_to, try_count = count)
|
||||||
|
|
||||||
# Subject
|
# Subject
|
||||||
subj = "Try Build on %s, branch %s" % (name, branch)
|
subj = "Try Build #%d on %s, branch %s" % (count, name, branch)
|
||||||
|
|
||||||
# Body
|
# Body
|
||||||
text = ""
|
text = ""
|
||||||
|
|
Loading…
Reference in a new issue