mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-11 03:10:59 +00:00
Fixes #5146 Handle missing stdin when running under celery with rabbitmq or redis
This commit is contained in:
@@ -405,8 +405,13 @@ class Runner(object):
|
||||
return flags
|
||||
|
||||
try:
|
||||
if not new_stdin:
|
||||
self._new_stdin = os.fdopen(os.dup(sys.stdin.fileno()))
|
||||
fileno = 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:
|
||||
self._new_stdin = new_stdin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user