Skip to content

Commit

Permalink
Core: make shlex split an attempt with regular split retry (#4046)
Browse files Browse the repository at this point in the history
  • Loading branch information
Berserker66 authored Oct 11, 2024
1 parent f495bf7 commit ef4d1e7
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 ef4d1e7

Please sign in to comment.