KeySequence: Make sure we got valid key codes

This commit is contained in:
Florian Bruhin 2018-03-04 17:37:37 +01:00
parent 3649a36869
commit 68db8d04ad

View File

@ -356,6 +356,7 @@ class KeySequence:
def _validate(self, keystr=None):
for info in self:
assert Qt.Key_Space <= info.key <= Qt.Key_unknown, info.key
if info.key == Qt.Key_unknown:
raise KeyParseError(keystr, "Got unknown key!")