Project

General

Profile

Revision 235

added handling for timeouts in readKey

View differences:

trunk/swipe/tooltron.py
328 328

  
329 329
            resp = None
330 330
            while resp==None:
331
               resp = common.readKey()
331
               try:
332
                  resp = common.readKey()
333
               except TimoutException:
334
                  print "got TIMEOUT from keypad, breaking out of loop"
335
                  break
332 336

  
333 337
               #no lock since we are just reading and we can afford to
334 338
               #miss a loop

Also available in: Unified diff