Skip to content

Commit

Permalink
Ignore curs_set exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
themoken committed Nov 4, 2009
1 parent a16e650 commit 3d121de
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions canto/input.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -98,10 +98,19 @@ def input(cfg, prompt):


temp = signal.getsignal(signal.SIGALRM) temp = signal.getsignal(signal.SIGALRM)
signal.signal(signal.SIGALRM, signal.SIG_IGN) signal.signal(signal.SIGALRM, signal.SIG_IGN)


curses.curs_set(1) # These curs_set calls can except, but we shouldn't care
try:
curses.curs_set(1)
except:
pass

term = InputBox(cfg.msg).edit() term = InputBox(cfg.msg).edit()
curses.curs_set(0)
try:
curses.curs_set(0)
except:
pass


signal.signal(signal.SIGALRM, temp) signal.signal(signal.SIGALRM, temp)
signal.alarm(1) signal.alarm(1)
Expand Down

0 comments on commit 3d121de

Please sign in to comment.