diff --git a/changelogs/fragments/pause-import.yml b/changelogs/fragments/pause-import.yml new file mode 100644 index 00000000000..c6b73f91670 --- /dev/null +++ b/changelogs/fragments/pause-import.yml @@ -0,0 +1,2 @@ +bugfixes: +- "pause - catch additional error on setting up curses (https://github.com/ansible/ansible/pull/73588)." diff --git a/lib/ansible/plugins/action/pause.py b/lib/ansible/plugins/action/pause.py index 88babe61b33..cb367091682 100644 --- a/lib/ansible/plugins/action/pause.py +++ b/lib/ansible/plugins/action/pause.py @@ -40,12 +40,13 @@ display = Display() try: import curses + import io # Nest the try except since curses.error is not available if curses did not import try: curses.setupterm() HAS_CURSES = True - except (curses.error, TypeError): + except (curses.error, TypeError, io.UnsupportedOperation): HAS_CURSES = False except ImportError: HAS_CURSES = False