aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-06-20 14:11:51 -0400
committerGitHub <noreply@github.com>2020-06-20 14:11:51 -0400
commit232d9269e72de2ccea0b70edff4a817934fb4cd0 (patch)
treeb8a96af848dedfd4c34672fb011243367f7d10ea /python/servo/command_base.py
parent292704b1f3e0a27f8ec72c752de612c12e4b0ae9 (diff)
parenta202a1d5b6e4a6940fc36df62347d557ba82e05f (diff)
downloadservo-232d9269e72de2ccea0b70edff4a817934fb4cd0.tar.gz
servo-232d9269e72de2ccea0b70edff4a817934fb4cd0.zip
Auto merge of #27004 - saschanaz:py3-env, r=jdm
Fix Py3 environment setting failures <!-- Please describe your changes on the following line: --> `python3 mach build -d` now proceeds to actual build. Since Gecko landed full Python 3 support, updating mozjs should allow us to drop Python 2 to build Servo. (I still see failures on other commands e.g. `test-tidy`.) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 726afd0d0c7..2fab0d166cc 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -131,17 +131,17 @@ def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None):
def normalize_env(env):
- # There is a bug in subprocess where it doesn't like unicode types in
+ # There is a bug in Py2 subprocess where it doesn't like unicode types in
# environment variables. Here, ensure all unicode are converted to
- # binary. utf-8 is our globally assumed default. If the caller doesn't
- # want UTF-8, they shouldn't pass in a unicode instance.
+ # native string type. utf-8 is our globally assumed default. If the caller
+ # doesn't want UTF-8, they shouldn't pass in a unicode instance.
normalized_env = {}
for k, v in env.items():
if isinstance(k, six.text_type):
- k = k.encode('utf-8', 'strict')
+ k = six.ensure_str(k, 'utf-8', 'strict')
if isinstance(v, six.text_type):
- v = v.encode('utf-8', 'strict')
+ v = six.ensure_str(v, 'utf-8', 'strict')
normalized_env[k] = v