From 6200c1db4fc1dfa794c5e4e68de05861d8edf25a Mon Sep 17 00:00:00 2001 From: Pavel Minaev Date: Tue, 25 Aug 2020 18:59:28 -0700 Subject: [PATCH] Fix os.environ encoding on Python 2.7. --- src/debugpy/_vendored/force_pydevd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debugpy/_vendored/force_pydevd.py b/src/debugpy/_vendored/force_pydevd.py index f4dec254c..641c410b3 100644 --- a/src/debugpy/_vendored/force_pydevd.py +++ b/src/debugpy/_vendored/force_pydevd.py @@ -22,13 +22,13 @@ # If debugpy logging is enabled, enable it for pydevd as well if "DEBUGPY_LOG_DIR" in os.environ: - os.environ["PYDEVD_DEBUG"] = str("True") - os.environ["PYDEVD_DEBUG_FILE"] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log") + os.environ[str("PYDEVD_DEBUG")] = str("True") + os.environ[str("PYDEVD_DEBUG_FILE")] = os.environ["DEBUGPY_LOG_DIR"] + str("/debugpy.pydevd.log") # Work around https://github.com/microsoft/debugpy/issues/346. # Disable pydevd frame-eval optimizations only if unset, to allow opt-in. if "PYDEVD_USE_FRAME_EVAL" not in os.environ: - os.environ["PYDEVD_USE_FRAME_EVAL"] = str("NO") + os.environ[str("PYDEVD_USE_FRAME_EVAL")] = str("NO") # Constants must be set before importing any other pydevd module