diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2021-03-11 21:21:02 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2021-03-11 21:22:59 +0800 |
commit | 53cfee1b8e68a7393f04d23b54524a8d2b92811a (patch) | |
tree | 9137d7f67b0f0105630e681aa7d9e58e656ba1eb | |
parent | 595cb903621f787d6a313073bd42bcf26be18612 (diff) |
which was reported like the following:
12:04:37 + /home/buildslave/srv/aosp-master/build-tools/build-scripts/../node/prepare_build_config.py 'MANIFEST_REPO=https://android.googlesource.com/platform/manifest.git
12:04:37 MANIFEST_BRANCH=master
12:04:37 MAKE_JOBS=16
12:04:37 MAKE_TARGETS="dist"
12:04:37 MANIFEST_FILENAME=default.xml
12:04:37 LUNCH=hikey960-userdebug
12:04:37 TARGET_PRODUCT=hikey960
12:04:37 TARGET_SIMULATOR=false
12:04:37 USE_CLANG_PLATFORM_BUILD=true
12:04:37 SKIP_LICENSE_CHECK=1
12:04:37 REWRITE_MANIFEST=0'
12:04:37 Traceback (most recent call last):
12:04:37 File "/home/buildslave/srv/aosp-master/build-tools/build-scripts/../node/prepare_build_config.py", line 123, in <module>
12:04:37 main(args[0], options.base64)
12:04:37 File "/home/buildslave/srv/aosp-master/build-tools/build-scripts/../node/prepare_build_config.py", line 115, in main
12:04:37 config = convert_config_to_shell(config_in, BUILD_CONFIG_FILE)
12:04:37 File "/home/buildslave/srv/aosp-master/build-tools/build-scripts/../node/prepare_build_config.py", line 93, in convert_config_to_shell
12:04:37 for l in config_text.decode().split("\n"):
12:04:37 AttributeError: 'str' object has no attribute 'decode'
by making the config_text passed in a str type
for both the base64 and non-base64 cases
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Change-Id: I84c7ffabc1a2b6cf035767a6195d6fe53ff5d4cf
-rwxr-xr-x | node/prepare_build_config.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/node/prepare_build_config.py b/node/prepare_build_config.py index 0b8dc2a..4343d5c 100755 --- a/node/prepare_build_config.py +++ b/node/prepare_build_config.py @@ -90,7 +90,7 @@ def convert_config_to_shell(config_text, out_filename): config = {} out = open(out_filename, "w") - for l in config_text.decode().split("\n"): + for l in config_text.split("\n"): l = l.strip() if not l or l[0] == "#": continue @@ -107,7 +107,7 @@ def convert_config_to_shell(config_text, out_filename): def main(config_in, is_base64): if is_base64: - config_in = base64.b64decode(config_in) + config_in = base64.b64decode(config_in).decode() if is_on_ec2(): BUILD_CONFIG_FILE=BUILD_CONFIG_FILE_EC2 else: |