From dc4d4e70e487033b2fd1c6b71b5895625f736e0b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 2 Aug 2015 12:44:54 +0200 Subject: [PATCH] Make sure state is valid in ShellLexer. --- qutebrowser/misc/split.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qutebrowser/misc/split.py b/qutebrowser/misc/split.py index a7bbeea6e..57080f0c5 100644 --- a/qutebrowser/misc/split.py +++ b/qutebrowser/misc/split.py @@ -117,6 +117,8 @@ class ShellLexer: self.state = nextchar else: self.token += nextchar + else: + raise AssertionError("Invalid state {!r}!".format(self.state)) if self.state in self.escape and not self.keep: self.token += self.state if self.token or self.quoted: