diff options
author | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2020-06-20 17:36:01 +0200 |
---|---|---|
committer | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2020-06-20 17:36:01 +0200 |
commit | a202a1d5b6e4a6940fc36df62347d557ba82e05f (patch) | |
tree | 0dff8fba48928cce602937ca5ac5ed6e780adcba /python/servo/build_commands.py | |
parent | 0b61cfc3ae803ac0f9deef937f890f83b24c9a35 (diff) | |
download | servo-a202a1d5b6e4a6940fc36df62347d557ba82e05f.tar.gz servo-a202a1d5b6e4a6940fc36df62347d557ba82e05f.zip |
Fix Py3 environment setting failures
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 3b87e9aba7e..c3a0819ac00 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -320,7 +320,10 @@ class MachCommands(CommandBase): exitcode = process.wait() encoding = locale.getpreferredencoding() # See https://stackoverflow.com/a/9228117 if exitcode == 0: - os.environ.update(eval(stdout.decode(encoding))) + decoded = stdout.decode(encoding) + if decoded.startswith("environ("): + decoded = decoded.strip()[8:-1] + os.environ.update(eval(decoded)) else: print("Failed to run vcvarsall. stderr:") print(stderr.decode(encoding)) |