comparison win32.py @ 120:08a1d6cc5948

Named a magic number that had sneaked into win32.py
author Oleg Oshmyan <chortos@inbox.lv>
date Thu, 21 Apr 2011 22:39:23 +0300
parents 6bb59a011bcb
children 72c02b640dcf
comparison
equal deleted inserted replaced
119:0b265fe9c81f 120:08a1d6cc5948
497 if remaining > 0: 497 if remaining > 0:
498 if (WaitForMultipleObjects(handles, False, remaining) == 498 if (WaitForMultipleObjects(handles, False, remaining) ==
499 WAIT_OBJECT_0): 499 WAIT_OBJECT_0):
500 ir = ReadConsoleInput(stdin) 500 ir = ReadConsoleInput(stdin)
501 if (ir and 501 if (ir and
502 ir.EventType == 1 and 502 ir.EventType == KEY_EVENT and
503 ir.Event.KeyEvent.bKeyDown and 503 ir.Event.KeyEvent.bKeyDown and
504 ir.Event.KeyEvent.wVirtualKeyCode == 27): 504 ir.Event.KeyEvent.wVirtualKeyCode == 27):
505 raise testcases.CanceledByUser 505 raise testcases.CanceledByUser
506 else: 506 else:
507 raise testcases.WallTimeLimitExceeded 507 raise testcases.WallTimeLimitExceeded
509 while case.process.poll() is None: 509 while case.process.poll() is None:
510 if (WaitForMultipleObjects(handles, False, INFINITE) == 510 if (WaitForMultipleObjects(handles, False, INFINITE) ==
511 WAIT_OBJECT_0): 511 WAIT_OBJECT_0):
512 ir = ReadConsoleInput(stdin) 512 ir = ReadConsoleInput(stdin)
513 if (ir and 513 if (ir and
514 ir.EventType == 1 and 514 ir.EventType == KEY_EVENT and
515 ir.Event.KeyEvent.bKeyDown and 515 ir.Event.KeyEvent.bKeyDown and
516 ir.Event.KeyEvent.wVirtualKeyCode == 27): 516 ir.Event.KeyEvent.wVirtualKeyCode == 27):
517 raise testcases.CanceledByUser 517 raise testcases.CanceledByUser
518 case.time_stopped = clock() 518 case.time_stopped = clock()
519 if GetProcessTimes and (case.maxcputime or not case.maxwalltime): 519 if GetProcessTimes and (case.maxcputime or not case.maxwalltime):