mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
Fix NameError in pause module (#42038)
* Fix NameError in pause module * Add comment and changelog Co-authored-by: Jerry Chong <jchong@netbase.com>
This commit is contained in:
parent
cde3a03b32
commit
42f44b24c6
2 changed files with 10 additions and 3 deletions
|
@ -39,9 +39,14 @@ except ImportError:
|
|||
|
||||
try:
|
||||
import curses
|
||||
curses.setupterm()
|
||||
HAS_CURSES = True
|
||||
except (ImportError, curses.error):
|
||||
|
||||
# Nest the try except since curses.error is not available if curses did not import
|
||||
try:
|
||||
curses.setupterm()
|
||||
HAS_CURSES = True
|
||||
except curses.error:
|
||||
HAS_CURSES = False
|
||||
except ImportError:
|
||||
HAS_CURSES = False
|
||||
|
||||
if HAS_CURSES:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue