Fix db_file

This commit is contained in:
Sergio Durigan Junior 2017-09-05 10:27:19 -04:00
parent 5586d736fd
commit 48c3009733

View file

@ -441,7 +441,6 @@ send to the gdb-testers mailing list."""
properties = build.getProperties ()
isrebuild = properties.getProperty ('isRebuild')
try_count = properties.getProperty ('try_count')
db_file = os.path.join (get_web_base (), name, name + '.db')
try_to = build.getReason ().strip ("'try' job by user ")
# Sending the root message to gdb-testers.
@ -790,6 +789,9 @@ class ComputeTryBuildCount (steps.BuildStep):
if not istry:
count = 0
else:
builder = self.getProperty ('buildername')
db_file = os.path.join (get_web_base (), builder, builder + '.db')
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))