Core: make shlex split an attempt with regular split retry (#4046)

This commit is contained in:
Fabian Dill 2024-10-11 23:24:42 +02:00 committed by GitHub
parent f495bf7261
commit ef4d1e77e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -1153,7 +1153,10 @@ class CommandProcessor(metaclass=CommandMeta):
if not raw:
return
try:
command = shlex.split(raw, comments=False)
try:
command = shlex.split(raw, comments=False)
except ValueError: # most likely: "ValueError: No closing quotation"
command = raw.split()
basecommand = command[0]
if basecommand[0] == self.marker:
method = self.commands.get(basecommand[1:].lower(), None)