diff --git a/changelogs/fragments/pause-catch-error-when-no-std-exists.yml b/changelogs/fragments/pause-catch-error-when-no-std-exists.yml new file mode 100644 index 00000000000..040483b4a31 --- /dev/null +++ b/changelogs/fragments/pause-catch-error-when-no-std-exists.yml @@ -0,0 +1,2 @@ +bugfixes: + - pause - handle exception when there is no stdout (https://github.com/ansible/ansible/pull/47851) diff --git a/lib/ansible/plugins/action/pause.py b/lib/ansible/plugins/action/pause.py index 3a965a875e6..86bd7e1ed94 100644 --- a/lib/ansible/plugins/action/pause.py +++ b/lib/ansible/plugins/action/pause.py @@ -41,7 +41,7 @@ try: try: curses.setupterm() HAS_CURSES = True - except curses.error: + except (curses.error, TypeError): HAS_CURSES = False except ImportError: HAS_CURSES = False