Catch more potential errors when setting up curses.

pull/73309/merge
Felix Fontein 4 years ago committed by Matt Clay
parent f0ec10dbc3
commit ff0edca8cc

@ -0,0 +1,2 @@
bugfixes:
- "pause - catch additional error on setting up curses (https://github.com/ansible/ansible/pull/73588)."

@ -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

Loading…
Cancel
Save