diff options
| author | Michael Zalimeni <michael.zalimeni@bronto.com> | 2018-08-08 11:49:46 -0400 |
|---|---|---|
| committer | Michael Zalimeni <michael.zalimeni@bronto.com> | 2018-08-08 11:49:46 -0400 |
| commit | fe4bb23415c6a40edfff97da6bfe0c313fb2f4f4 (patch) | |
| tree | 306efee8576805fecc048f91ab933d8ba25e0113 | |
| parent | 413e802f8fe390738bc1e89716083586e0269fd0 (diff) | |
| download | redis-py-fe4bb23415c6a40edfff97da6bfe0c313fb2f4f4.tar.gz | |
Fix parsing for INFO keys that include ':'
| -rwxr-xr-x | redis/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index 79e94d0..1e31a6e 100755 --- a/redis/client.py +++ b/redis/client.py @@ -114,7 +114,8 @@ def parse_info(response): for line in response.splitlines(): if line and not line.startswith('#'): if line.find(':') != -1: - key, value = line.split(':', 1) + # support keys that include ':' by using rsplit + key, value = line.rsplit(':', 1) info[key] = get_value(value) else: # if the line isn't splittable, append it to the "__raw__" key |
