[Python-checkins] python/dist/src/Lib/curses has_key.py,1.2,1.3

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Tue Sep 2 05:44:46 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib/curses
In directory sc8-pr-cvs1:/tmp/cvs-serv4371
Modified Files:
	has_key.py 
Log Message:
[Patch #759208] Fix has_key emulation to not raise KeyError
Index: has_key.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/curses/has_key.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** has_key.py	13 Aug 2001 13:45:22 -0000	1.2
--- has_key.py	2 Sep 2003 11:44:44 -0000	1.3
***************
*** 164,168 ****
 
 # Figure out the correct capability name for the keycode.
! capability_name = _capability_names[ch]
 
 #Check the current terminal description for that capability;
--- 164,170 ----
 
 # Figure out the correct capability name for the keycode.
! capability_name = _capability_names.get(ch)
! if capability_name is None:
! return 0
 
 #Check the current terminal description for that capability;


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /