aboutsummaryrefslogtreecommitdiff
path: root/cros_utils/misc.py
diff options
context:
space:
mode:
authorTiancong Wang <tcwang@google.com>2020-06-26 10:50:48 -0700
committerTiancong Wang <tcwang@google.com>2020-06-29 17:08:04 +0000
commitfab4f3c2a2954caa1363aa96b7c5587afb1dd070 (patch)
tree6c83282b3cb69440a02e424e09918887985f6350 /cros_utils/misc.py
parent8078daaf7a0370d85546210425bbde7b507cfebf (diff)
downloadtoolchain-utils-fab4f3c2a2954caa1363aa96b7c5587afb1dd070.tar.gz
cros_util: fix up naming
Since these two scripts are tracking upstream Chrome OS repos, fixing naming is a bit harder. This patch creates a variable to hold the name of the main branch, so it's easier to fix these files in case any future name fixing on upstream. Also run `yapf` during presubmit. BUG=chromium:1099035 TEST=None Change-Id: Ic72a213dadf12b382a76fe50d48cde6fcecc3b25 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2270728 Reviewed-by: Caroline Tice <cmtice@chromium.org> Commit-Queue: Tiancong Wang <tcwang@google.com> Tested-by: Tiancong Wang <tcwang@google.com>
Diffstat (limited to 'cros_utils/misc.py')
-rw-r--r--cros_utils/misc.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cros_utils/misc.py b/cros_utils/misc.py
index b4beb60c..d8b47d19 100644
--- a/cros_utils/misc.py
+++ b/cros_utils/misc.py
@@ -24,6 +24,8 @@ CHROMEOS_SCRIPTS_DIR = '/mnt/host/source/src/scripts'
TOOLCHAIN_UTILS_PATH = ('/mnt/host/source/src/third_party/toolchain-utils/'
'cros_utils/toolchain_utils.sh')
+CROS_MAIN_BRANCH = 'cros/master'
+
def GetChromeOSVersionFromLSBVersion(lsb_version):
"""Get Chromeos version from Lsb version."""
@@ -444,8 +446,9 @@ def DeleteChromeOsTree(chromeos_root, dry_run=False):
cmd1, print_to_console=True) == 0
-def ApplyGerritPatches(chromeos_root, gerrit_patch_string,
- branch='cros/master'):
+def ApplyGerritPatches(chromeos_root,
+ gerrit_patch_string,
+ branch=CROS_MAIN_BRANCH):
"""Apply gerrit patches on a chromeos tree.
Args: