autotest: catch Exception when label is not matched to certain pattern.

BUG=chromium:726354
TEST=Ran on cautotest (as a temp fix to save suite_scheduler)

Change-Id: I4e50e87b3d9ed9dae407a5a5a4ffc05b900b8cde
Reviewed-on: https://chromium-review.googlesource.com/516802
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Paul Hobbs <phobbs@google.com>
Commit-Queue: Xixuan Wu <xixuan@chromium.org>
Tested-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/site_utils/suite_scheduler/board_enumerator.py b/site_utils/suite_scheduler/board_enumerator.py
index 3ff08ae..1cb100d 100644
--- a/site_utils/suite_scheduler/board_enumerator.py
+++ b/site_utils/suite_scheduler/board_enumerator.py
@@ -59,6 +59,10 @@
 
         # Filter out all board labels tailing with -number, which is used for
         # testbed only.
-        label_names = set([re.match(r'(.*?)(?:-\d+)?$', l.name).group(1)
-                           for l in labels])
+        label_names = set()
+        for l in labels:
+            matcher = re.match(r'(.*?)(?:-\d+)?$', l.name)
+            if matcher is not None:
+                label_names.add(matcher.group(1))
+
         return map(lambda l: l.split(':', 1)[1], label_names)