diff options
author | Ulises Mendez Martinez <umendez@google.com> | 2024-04-17 10:16:24 +0000 |
---|---|---|
committer | Ulises Mendez Martinez <umendez@google.com> | 2024-04-18 14:34:44 +0000 |
commit | 2fbe7da69cd28d08d3f53d4576ddd66898650077 (patch) | |
tree | 023499212bbc37c2a5383d6d8b9129494b37bba0 | |
parent | 33bd210159ff8807096f9db99025c838c88fd73e (diff) | |
download | bootstrap-2fbe7da69cd28d08d3f53d4576ddd66898650077.tar.gz |
ddk_bootstrap: Propagate --local argument to init_ddkmain
* This is now an accepted argument to init_ddk script, so propagate its
value when specified.
* The asserts removed are not longer needed now that argparse takes care
of the mutually exclusive group.
Bug: 328770706
Change-Id: I6590ea0b96944a16c933c21859db8c6a946abc40
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
-rw-r--r-- | init.py | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -91,7 +91,7 @@ class KleafBootstrap: def run(self): if self.local: args = [_TOOLS_BAZEL, "run", _INIT_DDK_TARGET] - args += ["--"] + args += ["--", "--local"] args += self._common_args() self._run_script(args, cwd=self.kleaf_repo) return @@ -99,8 +99,6 @@ class KleafBootstrap: if not self.build_id: self._set_build_id() - assert self.build_id, "build id is not set!" - with tempfile.NamedTemporaryFile( prefix="init_ddk_", suffix=".zip", mode="w+b" ) as init_ddk: @@ -114,7 +112,6 @@ class KleafBootstrap: self._run_script(args) def _set_build_id(self) -> str: - assert self.branch, "branch is not set!" build_ids_fp = io.BytesIO() url = _BUILD_IDS_URL_FMT.format( branch=self.branch, @@ -189,7 +186,7 @@ if __name__ == "__main__": "--local", help="Whether to use a local source tree containing Kleaf.", action="store_true", - default=None, + default=False, ) parser.add_argument( "--build_target", |