From 2b095079c111f1e9531e8c1cdabaecdddfad31ef Mon Sep 17 00:00:00 2001 From: Abhishek Pandit-Subedi Date: Thu, 1 Aug 2024 09:34:03 -0700 Subject: 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 --- build.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build.py') 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 -- cgit v1.2.3-59-g8ed1b