Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b095079 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

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
parent 2728941a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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