diff options
author | 2024-08-01 09:34:03 -0700 | |
---|---|---|
committer | 2024-08-01 13:59:40 -0700 | |
commit | 2b095079c111f1e9531e8c1cdabaecdddfad31ef (patch) | |
tree | 8dcd13db3a4e868d29df5865e9d1bd465aaf111a | |
parent | 2728941a1a69cc9da2c42e142b92013d75791667 (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-x | build.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |