aboutsummaryrefslogtreecommitdiff
path: root/cros_utils/buildbot_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'cros_utils/buildbot_utils.py')
-rw-r--r--cros_utils/buildbot_utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cros_utils/buildbot_utils.py b/cros_utils/buildbot_utils.py
index 35dc3ac6..a06abd26 100644
--- a/cros_utils/buildbot_utils.py
+++ b/cros_utils/buildbot_utils.py
@@ -5,6 +5,7 @@
"""Utilities for launching and accessing ChromeOS buildbots."""
+from __future__ import division
from __future__ import print_function
import ast
@@ -133,7 +134,7 @@ def GetTrybotImage(chromeos_root,
patch_list,
tryjob_flags=None,
build_toolchain=False,
- async=False):
+ asynchronous=False):
"""Launch buildbot and get resulting trybot artifact name.
This function launches a buildbot with the appropriate flags to
@@ -151,7 +152,7 @@ def GetTrybotImage(chromeos_root,
tryjob_flags: See cros tryjob --help for available options.
build_toolchain: builds and uses the latest toolchain, rather than the
prebuilt one in SDK.
- async: don't wait for artifacts; just return the buildbucket id
+ asynchronous: don't wait for artifacts; just return the buildbucket id
Returns:
(buildbucket id, partial image url) e.g.
@@ -159,7 +160,7 @@ def GetTrybotImage(chromeos_root,
"""
buildbucket_id = SubmitTryjob(chromeos_root, buildbot_name, patch_list,
tryjob_flags, build_toolchain)
- if async:
+ if asynchronous:
return buildbucket_id, ' '
# The trybot generally takes more than 2 hours to finish.
@@ -246,7 +247,7 @@ def GetLatestImage(chromeos_root, path):
_, out, _ = ce.ChrootRunCommandWOutput(
chromeos_root, command, print_to_console=False)
candidates = [l.split('/')[-2] for l in out.split()]
- candidates = map(fmt.match, candidates)
+ candidates = [fmt.match(c) for c in candidates]
candidates = [[int(r) for r in m.group(1, 2, 3, 4)] for m in candidates if m]
candidates.sort(reverse=True)
for c in candidates: