Kaydet (Commit) 0ec5288d authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Patch #759208] Fix has_key emulation to not raise KeyError

üst f70e0760
......@@ -163,7 +163,9 @@ def has_key(ch):
if type(ch) == type( '' ): ch = ord(ch)
# Figure out the correct capability name for the keycode.
capability_name = _capability_names[ch]
capability_name = _capability_names.get(ch)
if capability_name is None:
return 0
#Check the current terminal description for that capability;
#if present, return true, else return false.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment