diff options
author | Yunlian Jiang <yunlian@google.com> | 2017-01-03 14:49:13 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2017-01-03 23:28:39 +0000 |
commit | 53930064c8b68258872af1646c7fe18112ca494a (patch) | |
tree | b321c78364f6ed4339ccf4392d3e7f7f1972f619 | |
parent | c411035e2f13ed71d2dc0238f5cba31443d03d84 (diff) | |
download | toolchain-utils-53930064c8b68258872af1646c7fe18112ca494a.tar.gz |
buildbot_utils.py: do not get build_id for async build.
The build_id is not useful for async builds, so there is no need to
try to get it.
BUG=chromium:674804
TEST=None
Change-Id: If5781955834ca35958b1efead2dd9628e7a905de
Reviewed-on: https://chromium-review.googlesource.com/424794
Reviewed-by: Ting-Yuan Huang <laszio@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
-rw-r--r-- | cros_utils/buildbot_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cros_utils/buildbot_utils.py b/cros_utils/buildbot_utils.py index e9dbf8cb..c71cf4a0 100644 --- a/cros_utils/buildbot_utils.py +++ b/cros_utils/buildbot_utils.py @@ -244,6 +244,10 @@ def GetTrybotImage(chromeos_root, logger.GetLogger().LogFatal('Error occurred while launching trybot job: ' '%s' % command) + if async: + # Do not wait for trybot job to finish; return immediately. + return 0 + os.chdir(base_dir) build_id = 0 @@ -293,10 +297,6 @@ def GetTrybotImage(chromeos_root, pending = False build_id = data_dict['number'] - if async: - # Do not wait for trybot job to finish; return immediately - return build_id, " " - if not long_slept: # The trybot generally takes more than 2 hours to finish. # Wait two hours before polling the status. |