minor change to return proper treeid
This commit is contained in:
@@ -144,7 +144,7 @@ def GetOrInsertTree(conn, tree):
|
|||||||
|
|
||||||
conn.execute("""SELECT id FROM trees WHERE name = %s""", (tree))
|
conn.execute("""SELECT id FROM trees WHERE name = %s""", (tree))
|
||||||
if conn.rowcount > 0:
|
if conn.rowcount > 0:
|
||||||
return conn.lastrowid
|
return conn.fetchone()[0]
|
||||||
|
|
||||||
# need to insert it
|
# need to insert it
|
||||||
conn.execute("""INSERT INTO trees (name) VALUES (%s)""", (tree,))
|
conn.execute("""INSERT INTO trees (name) VALUES (%s)""", (tree,))
|
||||||
@@ -406,7 +406,7 @@ while curtime < endtime and chunk < totalchunks:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# Parse log to save 'TestFailed' results.
|
# Parse log to save 'TestFailed' results.
|
||||||
elif status == BuildStatus.TestFailed:
|
elif status == BuildStatus.TestFailed or status == BuildStatus.Burning or status == BuildStatus.Burning:
|
||||||
logging.info("Checking build log for '%s' at %d (%s)" % (name, starttime, ctime(starttime)))
|
logging.info("Checking build log for '%s' at %d (%s)" % (name, starttime, ctime(starttime)))
|
||||||
try:
|
try:
|
||||||
# Grab the build log.
|
# Grab the build log.
|
||||||
@@ -433,14 +433,14 @@ while curtime < endtime and chunk < totalchunks:
|
|||||||
logging.error("Unexpected error: %s" % sys.exc_info()[0])
|
logging.error("Unexpected error: %s" % sys.exc_info()[0])
|
||||||
#XXX: handle me?
|
#XXX: handle me?
|
||||||
|
|
||||||
# Ignore 'Burning' builds: tests may have run nontheless, but it's safer to discard them :-|
|
## Ignore 'Burning' builds: tests may have run nontheless, but it's safer to discard them :-|
|
||||||
elif status == BuildStatus.Burning:
|
#elif status == BuildStatus.Burning:
|
||||||
continue
|
# continue
|
||||||
|
#
|
||||||
# Ignore 'Exception' builds: should only be worse than 'Burning'.
|
## Ignore 'Exception' builds: should only be worse than 'Burning'.
|
||||||
# (Don't know much at time of writing, since this feature is not active yet: see bug 476656 and follow-ups.)
|
## (Don't know much at time of writing, since this feature is not active yet: see bug 476656 and follow-ups.)
|
||||||
elif status == BuildStatus.Exception:
|
#elif status == BuildStatus.Exception:
|
||||||
continue
|
# continue
|
||||||
|
|
||||||
# Save 'Unknown' status failure: this should not happen (unless new statuses are created), but we want to know if it does.
|
# Save 'Unknown' status failure: this should not happen (unless new statuses are created), but we want to know if it does.
|
||||||
elif status == BuildStatus.Unknown:
|
elif status == BuildStatus.Unknown:
|
||||||
|
|||||||
Reference in New Issue
Block a user