Skip to content

Conversation

swilly22
Copy link
Contributor

Recreate
127.0.0.1:6379> CLIENT SETNAME roi=lipman
OK
127.0.0.1:6379> CLIENT LIST
id=2 addr=127.0.0.1:49481 fd=8 name=roi=lipman age=27 ...

redis-py

File "/opt/redislabs/lib/cnm/python/redis/client.py", line 609, in client_list
File "/opt/redislabs/lib/cnm/python/redis/client.py", line 574, in execute_command
File "/opt/redislabs/lib/cnm/python/redis/client.py", line 588, in parse_response
File "/opt/redislabs/lib/cnm/python/redis/client.py", line 248, in parse_client_list
ValueError: dictionary update sequence element #3 has length 3; 2 is required

This PR splits on '=' only once,
such that client_name key will be "name" and the value would be "roi=lipman".

Copy link
Contributor

@laixintao laixintao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if you add a testcase for this 👍

…r, in that case the response parser will fail
@swilly22
Copy link
Contributor Author

@laixintao
Sure, added.

@andymccurdy
Copy link
Contributor

looks good to me! thanks!

@andymccurdy andymccurdy merged commit 9858a09 into redis:master Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants