Skip to content

Commit

Permalink
Core: make shlex split an attempt with regular split retry
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 committed Oct 11, 2024
1 parent f495bf7 commit 245f549
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,10 @@ def __call__(self, raw: str) -> typing.Optional[bool]:
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)
Expand Down

0 comments on commit 245f549

Please sign in to comment.