summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Abhishek Pandit-Subedi <abhishekpandit@google.com> 2024-08-01 09:34:03 -0700
committer Abhishek Pandit-Subedi <abhishekpandit@google.com> 2024-08-01 13:59:40 -0700
commit2b095079c111f1e9531e8c1cdabaecdddfad31ef (patch)
tree8dcd13db3a4e868d29df5865e9d1bd465aaf111a
parent2728941a1a69cc9da2c42e142b92013d75791667 (diff)
floss: Fix env encoding issue with build.py
Running commands using subprocess can fail if there are any `None` values in env as os.fsencode throws a TypeError. Manually replace them with empty strings in that case. Bug: 356870224 Test: mmm packages/modules/Bluetooth Change-Id: I6ce9e6e79de073686b102e8c783981f0145b9a4e
-rwxr-xr-xbuild.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/build.py b/build.py
index 0b51e3367a..8d8e12d0b8 100755
--- a/build.py
+++ b/build.py
@@ -295,6 +295,10 @@ class HostBuild():
if not env:
env = self.env
+ for k, v in env.items():
+ if env[k] is None:
+ env[k] = ""
+
log_file = os.path.join(self.output_dir, '{}.log'.format(target))
with open(log_file, 'wb') as lf:
rc = 0