mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #5146 Handle missing stdin when running under celery with rabbitmq or redis
This commit is contained in:
parent
89abc35e59
commit
fc473b3246
1 changed files with 7 additions and 2 deletions
|
@ -405,8 +405,13 @@ class Runner(object):
|
||||||
return flags
|
return flags
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not new_stdin:
|
fileno = sys.stdin.fileno()
|
||||||
self._new_stdin = os.fdopen(os.dup(sys.stdin.fileno()))
|
except ValueError:
|
||||||
|
fileno = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
if not new_stdin and fileno is not None:
|
||||||
|
self._new_stdin = os.fdopen(os.dup(fileno))
|
||||||
else:
|
else:
|
||||||
self._new_stdin = new_stdin
|
self._new_stdin = new_stdin
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue