Add handling of empty spaces during CLIENT LIST response parsing by peperon · Pull Request #3797 · redis/redis-py (original) (raw)
Pull Request check-list
Please make sure to review and check all of these items:
- Do tests and lints pass with this change?
- Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
- Is the new or changed code fully tested?
- Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
- Is there an example added to the examples folder (if applicable)?
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
This change is addressing an issue where we may have white space in the value of some the attributes returned by CLIENT LIST. For example, when runing redis with unix socket like:
redis-server --port 0 \
--unixsocket "/tmp/redis sock/redis.sock" \
--unixsocketperm 777 \
--save "" --appendonly no
Where the socket file have white space in the path - /tmp/redis sock/redis.sock. With the current implementation, in this case we getting exception like - ValueError: dictionary update sequence element #n has length 1; 2 is required..