Skip to content

Commit e95ea11

Browse files
johnslavikvstinner
andauthored
Simplify INPUTRC insertion
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 4de3631 commit e95ea11

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/support/pty_helper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ def run_pty(script, input=b"dummy input\r", env=None, readline=None):
2222
# Isolate readline from personal init files by setting INPUTRC
2323
# to an empty file. See also GH-142353.
2424
if env is None:
25-
env = {**os.environ.copy(), "INPUTRC": os.devnull}
26-
else:
27-
env.setdefault("INPUTRC", os.devnull)
25+
env = os.environ.copy()
26+
env.setdefault("INPUTRC", os.devnull)
2827

2928
proc = subprocess.Popen(args, stdin=slave, stdout=slave, stderr=slave, env=env)
3029
os.close(slave)

0 commit comments

Comments
 (0)