Don't choke on empty command string
This commit is contained in:
parent
330332da6d
commit
53861306ff
@ -82,6 +82,8 @@ class CommandParser(QObject):
|
|||||||
"""
|
"""
|
||||||
self.text = text
|
self.text = text
|
||||||
parts = self.text.strip().split(maxsplit=1)
|
parts = self.text.strip().split(maxsplit=1)
|
||||||
|
if not parts:
|
||||||
|
raise NoSuchCommandError
|
||||||
cmdstr = parts[0]
|
cmdstr = parts[0]
|
||||||
try:
|
try:
|
||||||
cmd = cmd_dict[cmdstr]
|
cmd = cmd_dict[cmdstr]
|
||||||
|
Loading…
Reference in New Issue
Block a user