If the delimiter used by SplittingInterpreter is at the end of a message, it will return an empty string. I believe it should also discard empty strings from re.split().
It appears that 74e0227 introduced this bug in the original pull request.
The intention behind my work was to split on e.g. \r\n if two messages were received alongside each other. If you use the SplittingInterpreter as above, it will fail on individual commands.
A temporary workaround is to create a RegexCommand to discard the empty messages.
I am not aware of a preferred method for splitting messages like the above. Regardless, I cannot think of a situation in which you would want empty strings returned.
If the delimiter used by
SplittingInterpreter
is at the end of a message, it will return an empty string. I believe it should also discard empty strings from re.split().It appears that 74e0227 introduced this bug in the original pull request.
The intention behind my work was to split on e.g.
\r\n
if two messages were received alongside each other. If you use theSplittingInterpreter
as above, it will fail on individual commands.A temporary workaround is to create a
RegexCommand
to discard the empty messages.