From d3227d34c2f62e1b1c451dd2d7d14a2b8a628c70 Mon Sep 17 00:00:00 2001 From: Durham Goode Date: Tue, 4 Feb 2020 17:29:56 -0800 Subject: [PATCH] py3: remove forced decoding of environment variable Summary: On python 2, os.environ is expected to be bytes, so let's remove the forced decoding. This broke run-tests.py on Windows. Reviewed By: singhsrb Differential Revision: D19737218 fbshipit-source-id: d4782eea279275f57cc91bc412a2d74857002cc1 --- eden/scm/tests/run-tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eden/scm/tests/run-tests.py b/eden/scm/tests/run-tests.py index 7b75339bb8..8a37e0fa17 100755 --- a/eden/scm/tests/run-tests.py +++ b/eden/scm/tests/run-tests.py @@ -635,7 +635,7 @@ def parseargs(args, parser): if options.with_hg: options.with_hg = canonpath(_bytespath(options.with_hg)) # HGEXECUTABLEPATH is used by util.hgcmd() - os.environ["HGEXECUTABLEPATH"] = options.with_hg.decode("utf-8") + os.environ["HGEXECUTABLEPATH"] = _strpath(options.with_hg) if not ( os.path.isfile(options.with_hg) and os.access(options.with_hg, os.X_OK) ):