Using c.fetchone ()[0]
This commit is contained in:
parent
ba4070a977
commit
f6545f3e58
3 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ def create_copy_command (props):
|
||||||
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' % (rev, branch))
|
c.execute ('SELECT COUNT(*) FROM logs WHERE commitid = "%s" AND branch = "%s" AND trysched = 1' % (rev, branch))
|
||||||
count = int (c.fetchone ())
|
count = int (c.fetchone ()[0])
|
||||||
con.close ()
|
con.close ()
|
||||||
|
|
||||||
to_path = os.path.join (get_web_base (), builder, 'try', rev[:2], rev, count)
|
to_path = os.path.join (get_web_base (), builder, 'try', rev[:2], rev, count)
|
||||||
|
|
|
@ -79,7 +79,7 @@ class DejaResults(object):
|
||||||
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' % (rev, branch))
|
c.execute ('SELECT COUNT(*) FROM logs WHERE commitid = "%s" AND branch = "%s" AND trysched = 1' % (rev, branch))
|
||||||
count = int (c.fetchone ())
|
count = int (c.fetchone ()[0])
|
||||||
con.close ()
|
con.close ()
|
||||||
|
|
||||||
bdir = os.path.join (gdb_web_base, builder, 'try', rev[:2], rev, count)
|
bdir = os.path.join (gdb_web_base, builder, 'try', rev[:2], rev, count)
|
||||||
|
|
|
@ -445,7 +445,7 @@ 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 ())
|
count = int (c.fetchone ()[0])
|
||||||
con.close ()
|
con.close ()
|
||||||
|
|
||||||
try_to = build.getReason ().strip ("'try' job by user ")
|
try_to = build.getReason ().strip ("'try' job by user ")
|
||||||
|
|
Loading…
Reference in a new issue