Modifiers writing to stdout – e.g.: FG, TEE, RETCODE(FG=True) and
TF(FG=True) – invoke commands with the specification stdin=None.
This is handled correctly by BaseCommand; however, StdinDataRedirection
misinterprets this as a further attempt to specify stdin (i.e. to
specify something rather than nothing).
This change brings StdinDataRedirection in line with its base class,
ignoring None as well as PIPE.
(Though a technical detail, the class would also have failed any
invocation setting stdin=PIPE, along the lines of: "TypeError: got
multiple values for keyword argument 'stdin'". The kwargs passed to the
wrapped command's popen are corrected as well.)
Coverage increased (+0.09%) to 83.673% when pulling ac15f1c6452372756816630b430e31af5738c224 on jesteria:604-fix-stdin-data-modifiers into 5fa1452846aae4a1fd2904bf145b0801c2050508 on tomerfiliba:master.
I.e. fixed:
Modifiers writing to stdout – e.g.:
FG
,TEE
,RETCODE(FG=True)
andTF(FG=True)
– invoke commands with the specificationstdin=None
. This is handled correctly byBaseCommand
; however,StdinDataRedirection
misinterprets this as a further attempt to specify stdin (i.e. to specify something rather than nothing).This change brings
StdinDataRedirection
in line with its base class, ignoringNone
as well asPIPE
.(Though a technical detail, the class would also have failed any invocation setting
stdin=PIPE
, along the lines of: "TypeError: got multiple values for keyword argument 'stdin'". The kwargs passed to the wrapped command'spopen
are corrected as well.)resolves #604