Handle new sections in KeyConfgParser._is_new().

This commit is contained in:
Florian Bruhin 2015-04-21 18:32:32 +02:00
parent 9ee74253e4
commit 3164ee06eb

View File

@ -256,7 +256,10 @@ class KeyConfigParser(QObject):
A binding is considered new if both the command is not bound to any key
yet, and the key isn't used anywhere else in the same section.
"""
bindings = self.keybindings[sectname]
try:
bindings = self.keybindings[sectname]
except KeyError:
return True
if keychain in bindings:
return False
elif command in bindings.values():