Issue #18300: Set TERM='' by default in assert_python_*

This commit is contained in:
Berker Peksag 2016-06-24 09:28:50 +03:00
parent 37e87e6ec1
commit e495646a97
2 changed files with 13 additions and 15 deletions

View file

@ -73,6 +73,10 @@ def run_python_until_end(*args, **env_vars):
# Need to preserve the original environment, for in-place testing of
# shared library builds.
env = os.environ.copy()
# set TERM='' unless the TERM environment variable is passed explicitly
# see issues #11390 and #18300
if 'TERM' not in env_vars:
env['TERM'] = ''
# But a special flag that can be set to override -- in this case, the
# caller is responsible to pass the full environment.
if env_vars.pop('__cleanenv', None):