mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix for "argument must be an int, or have a fileno() method" error
The issue was that, when forks == 1, the _executor() function was being called with None for the value of new_stdin. Fixes #3841, #3902
This commit is contained in:
parent
12a0a01cb0
commit
af4f0bd008
1 changed files with 4 additions and 1 deletions
|
@ -363,7 +363,10 @@ class Runner(object):
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._new_stdin = new_stdin
|
if not new_stdin:
|
||||||
|
self._new_stdin = os.fdopen(os.dup(sys.stdin.fileno()))
|
||||||
|
else:
|
||||||
|
self._new_stdin = new_stdin
|
||||||
|
|
||||||
exec_rc = self._executor_internal(host, new_stdin)
|
exec_rc = self._executor_internal(host, new_stdin)
|
||||||
if type(exec_rc) != ReturnData:
|
if type(exec_rc) != ReturnData:
|
||||||
|
|
Loading…
Add table
Reference in a new issue