Merge pull request #5 from jmdejong/patch-1

Ignore curs_set(0) error
pull/6/head
Jake Funke 2017-05-29 10:09:43 -07:00 committed by GitHub
commit 3816648d35
1 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,13 @@ class CursedMenu(object):
curses.noecho()
curses.raw()
curses.start_color()
curses.curs_set(0)
try:
curses.curs_set(0)
except curses.error:
# Not all terminals support this functionality.
# When the error is ignored the screen will look a little uglier, but that's not terrible
# So in order to keep botany as accesible as possible to everyone, it should be safe to ignore the error.
pass
self.screen.keypad(1)
self.plant = this_plant
self.user_data = this_data