Merge pull request #32 from ChristophGra/master
Error handling when getch() throws an errorpull/34/head
commit
f243391418
|
@ -756,10 +756,12 @@ class CursedMenu(object):
|
||||||
self.screen.addstr(16, 2, "{}'s garden is locked, but you can see in...".format(guest_garden))
|
self.screen.addstr(16, 2, "{}'s garden is locked, but you can see in...".format(guest_garden))
|
||||||
else:
|
else:
|
||||||
self.screen.addstr(16, 2, "i can't seem to find directions to {}...".format(guest_garden))
|
self.screen.addstr(16, 2, "i can't seem to find directions to {}...".format(guest_garden))
|
||||||
self.screen.getch()
|
try:
|
||||||
self.clear_info_pane()
|
self.screen.getch()
|
||||||
self.draw_plant_ascii(self.plant)
|
self.clear_info_pane()
|
||||||
self.visited_plant = None
|
self.draw_plant_ascii(self.plant)
|
||||||
|
finally:
|
||||||
|
self.visited_plant = None
|
||||||
|
|
||||||
def water_on_visit(self, guest_visitor_file):
|
def water_on_visit(self, guest_visitor_file):
|
||||||
visitor_data = {}
|
visitor_data = {}
|
||||||
|
|
Loading…
Reference in New Issue