changeset 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 0b265fe9c81f
children 72c02b640dcf
files win32.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/win32.py	Fri Apr 15 03:06:29 2011 +0300
+++ b/win32.py	Thu Apr 21 22:39:23 2011 +0300
@@ -499,7 +499,7 @@
 					    WAIT_OBJECT_0):
 						ir = ReadConsoleInput(stdin)
 						if (ir and
-						    ir.EventType == 1 and
+						    ir.EventType == KEY_EVENT and
 						    ir.Event.KeyEvent.bKeyDown and
 						    ir.Event.KeyEvent.wVirtualKeyCode == 27):
 							raise testcases.CanceledByUser
@@ -511,7 +511,7 @@
 				    WAIT_OBJECT_0):
 					ir = ReadConsoleInput(stdin)
 					if (ir and
-					    ir.EventType == 1 and
+					    ir.EventType == KEY_EVENT and
 					    ir.Event.KeyEvent.bKeyDown and
 					    ir.Event.KeyEvent.wVirtualKeyCode == 27):
 						raise testcases.CanceledByUser