Catch ValueError when parsing commands from keybindings

This commit is contained in:
Florian Bruhin 2014-01-20 17:52:39 +01:00
parent 5644eb94a4
commit ac570be7aa

View File

@ -85,10 +85,10 @@ class KeyParser(QObject):
self.keystring = ''
count = int(countstr) if countstr else None
# If we get a ValueError (invalid cmd) here, something is very wrong,
# so we don't catch it
self.commandparser.parse(cmdstr_hay)
try:
self.commandparser.parse(cmdstr_hay)
except ValueError:
return
try:
self.commandparser.check()
except ArgumentCountError: