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 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. yet, and the key isn't used anywhere else in the same section.
""" """
try:
bindings = self.keybindings[sectname] bindings = self.keybindings[sectname]
except KeyError:
return True
if keychain in bindings: if keychain in bindings:
return False return False
elif command in bindings.values(): elif command in bindings.values():