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

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


Update of /cvsroot/python/python/dist/src/Lib/curses
In directory sc8-pr-cvs1:/tmp/cvs-serv4705
Modified Files:
 Tag: release23-branch
	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.2.30.1
diff -C2 -d -r1.2 -r1.2.30.1
*** has_key.py	13 Aug 2001 13:45:22 -0000	1.2
--- has_key.py	2 Sep 2003 11:46:32 -0000	1.2.30.1
***************
*** 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 によって変換されたページ (->オリジナル) /