[autotest] Generate buildbot link to show pool health bugs.
This cl also sneaks in a fix for the '-m' option and checking
lab status, since any suite we are following with -m is already
started and hence doesn't care about lab status.
TEST=Ran run_suite and checked bug link, run_suite -m also generates
bug links like before.
BUG=chromium:419573,chromium:423847
Change-Id: Ic52d2bb7e4239f93207f37f6b38d6173f7526c00
Reviewed-on: https://chromium-review.googlesource.com/225664
Reviewed-by: Prashanth B <beeps@chromium.org>
Tested-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prashanth B <beeps@chromium.org>
diff --git a/server/site_utils.py b/server/site_utils.py
index 7d95215..3c01d34 100644
--- a/server/site_utils.py
+++ b/server/site_utils.py
@@ -206,7 +206,7 @@
# Lab is 'status' [regex ...] (comment)
# If the build name matches any regex, it will be blocked.
build_exceptions = re.search('\[(.*)\]', lab_status['message'])
- if not build_exceptions:
+ if not build_exceptions or not build:
return
for build_pattern in build_exceptions.group(1).split():
if re.search(build_pattern, build):