diff options
author | Yifan Hong <elsk@google.com> | 2024-03-20 18:10:55 -0700 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-03-21 12:43:15 +0000 |
commit | 115b5f28138ef723ec1abed6a0e81a455b07315d (patch) | |
tree | 709be56554ec9aaa72eb6a4adb070ce29523fc13 | |
parent | c1b63dfd50f665799a6a3bdc37e98200e202e8be (diff) | |
download | build-115b5f28138ef723ec1abed6a0e81a455b07315d.tar.gz |
kleaf: gen_ddk_headers: --dump is not a required argument.
--dump may or may not be set. If it is not set,
skip dumping.
Test: manual
Change-Id: I0675aec494a73d59b6d5421a58fea545c3d3fd7b
-rw-r--r-- | kleaf/impl/ddk/gen_ddk_headers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kleaf/impl/ddk/gen_ddk_headers.py b/kleaf/impl/ddk/gen_ddk_headers.py index 62eb22d..af07948 100644 --- a/kleaf/impl/ddk/gen_ddk_headers.py +++ b/kleaf/impl/ddk/gen_ddk_headers.py @@ -293,6 +293,8 @@ class GenDdkHeaders(buildozer_command_builder.BuildozerCommandBuilder): rel_path: directory under `--dump` to place the output JSON file obj: the object to dump """ + if not self.args.dump: + return path = self.args.dump / rel_path path.parent.mkdir(parents=True, exist_ok=True) with open(path, "w") as fp: |