summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Zalimeni <michael.zalimeni@bronto.com>2018-08-08 11:49:46 -0400
committerMichael Zalimeni <michael.zalimeni@bronto.com>2018-08-08 11:49:46 -0400
commitfe4bb23415c6a40edfff97da6bfe0c313fb2f4f4 (patch)
tree306efee8576805fecc048f91ab933d8ba25e0113
parent413e802f8fe390738bc1e89716083586e0269fd0 (diff)
downloadredis-py-fe4bb23415c6a40edfff97da6bfe0c313fb2f4f4.tar.gz
Fix parsing for INFO keys that include ':'
-rwxr-xr-xredis/client.py3
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