Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ffef244

Browse files
committed
Try to fix issue #21425 workaround for shared library builds
1 parent 5006a56 commit ffef244

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/script_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ def spawn_python(*args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw):
9292
# - http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
9393
# - http://stackoverflow.com/questions/15760712/python-readline-module-prints-escape-character-during-import
9494
# - http://lists.gnu.org/archive/html/bug-readline/2007-08/msg00004.html
95-
env = kw.setdefault('env', {})
96-
env.setdefault('TERM', 'vt100')
95+
env = kw.setdefault('env', dict(os.environ))
96+
env['TERM'] = 'vt100'
9797
return subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
9898
stdout=stdout, stderr=stderr,
9999
**kw)

0 commit comments

Comments
 (0)