jenkins-bot has submitted this change and it was merged.
Change subject: Use str() for environment variables in utils.execute ......................................................................
Use str() for environment variables in utils.execute
Python 2 subprocess _execute_child raises TypeError when the env parameter contains unicode.
Change-Id: Ia3aa6bde907ecbde96ac2de3785e48ce71a6d970 --- M tests/utils.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index 8aeb071..d23fd91 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -256,15 +256,17 @@ @param command: executable to run and arguments to use @type command: list of unicode """ + # Any environment variables added on Windows must be of type + # str() on Python 2. env = os.environ.copy() # sys.path may have been modified by the test runner to load dependencies. env['PYTHONPATH'] = ":".join(sys.path) # LC_ALL is used by i18n.input as an alternative for userinterface_lang if pywikibot.config.userinterface_lang: - env['LC_ALL'] = pywikibot.config.userinterface_lang + env['LC_ALL'] = str(pywikibot.config.userinterface_lang) # Set EDITOR to an executable that ignores all arguments and does nothing. if sys.platform == 'win32': - env['EDITOR'] = 'call' + env['EDITOR'] = str('call') else: env['EDITOR'] = 'true' options = {
pywikibot-commits@lists.wikimedia.org