jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/474471 )
Change subject: [FIX] Any environment variable added on Windows must be of type str on py 2 ......................................................................
[FIX] Any environment variable added on Windows must be of type str on py 2
Bug: T209767 Change-Id: Ia597b396b007e4299a864f8337238bff823b5ac6 --- M tests/utils.py 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: Mpaa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index ff13b92..dfd32a2 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -643,7 +643,10 @@ 'please update your Python.')) # Any environment variables added on Windows must be of type # str() on Python 2. - env = os.environ.copy() + if OSWIN32 and PY2: + env = {str(k): str(v) for k, v in os.environ.items()} + else: + env = os.environ.copy()
# Prevent output by test package; e.g. 'max_retries reduced from x to y' env[str('PYWIKIBOT_TEST_QUIET')] = str('1')