From 3164ee06eb62a1af86cb565df5f14a1f91b34ac0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 21 Apr 2015 18:32:32 +0200 Subject: [PATCH] Handle new sections in KeyConfgParser._is_new(). --- qutebrowser/config/parsers/keyconf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qutebrowser/config/parsers/keyconf.py b/qutebrowser/config/parsers/keyconf.py index 4482202aa..1fdc24025 100644 --- a/qutebrowser/config/parsers/keyconf.py +++ b/qutebrowser/config/parsers/keyconf.py @@ -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():