Fix variables

This commit is contained in:
Sergio Durigan Junior 2017-09-05 10:39:06 -04:00
parent afdae8c4ad
commit d750aad632

View file

@ -790,11 +790,13 @@ class ComputeTryBuildCount (steps.BuildStep):
count = 0 count = 0
else: else:
builder = self.getProperty ('buildername') builder = self.getProperty ('buildername')
rev = self.getProperty ('got_revision')
branch = self.getProperty ('branch')
db_file = os.path.join (get_web_base (), builder, builder + '.db') db_file = os.path.join (get_web_base (), builder, builder + '.db')
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' % (rev, branch))
count = c.fetchone ()[0] count = c.fetchone ()[0]
con.close () con.close ()