cbuildbot: Hack to allow branch-util again.

Add the necessary hacks to allow the following command to run.
  cros tryjob --local --production branch-util <branch args>

If we ever replace the branch-util tryjob with a local command, we
should remove these hacks, and either remove the ability to run
--local --production, or force --debug when doing it.

BUG=chromium:784985
TEST=run_tests
     Difficult to run local test tryjob until committed.

Change-Id: Ie8cdd19db122a36d26ab75745bb62f69c2564bf8
Reviewed-on: https://chromium-review.googlesource.com/826489
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index d787201..408e40d 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -848,10 +848,13 @@
   if options.enable_buildbot_tags:
     logging.EnableBuildbotMarkers()
 
-  elif options.buildbot and not options.debug:
-    # Cannot run real builds, except on real build machines.
-    if not cros_build_lib.HostIsCIBuilder():
-      cros_build_lib.Die('This host is not a supported build machine.')
+  if (options.buildbot and
+      not options.debug and
+      not options.build_config_name == constants.BRANCH_UTIL_CONFIG and
+      not cros_build_lib.HostIsCIBuilder()):
+    # --buildbot can only be used on a real builder, unless it's debug, or
+    # 'branch-util'.
+    cros_build_lib.Die('This host is not a supported build machine.')
 
   # Only one config arg is allowed in this mode, which was confirmed earlier.
   build_config = site_config[options.build_config_name]