summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorandy <andy@andymccurdy.com>2012-01-13 13:47:42 -0800
committerandy <andy@andymccurdy.com>2012-01-13 13:47:42 -0800
commit485a7918bb91846c219ff3213ec2d6e66b40e8ae (patch)
treedf3d002ccaa929b8c3176d71f1ddbbb3b70cda4c /redis/client.py
parent60e3be561417b3252d832c9fb45bf6072e3ccce8 (diff)
downloadredis-py-485a7918bb91846c219ff3213ec2d6e66b40e8ae.tar.gz
fix for #217 to make the INFO command parsing more tolerant
Diffstat (limited to 'redis/client.py')
-rw-r--r--redis/client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py
index dae4aee..9c5b501 100644
--- a/redis/client.py
+++ b/redis/client.py
@@ -71,8 +71,9 @@ def parse_info(response):
info = {}
def get_value(value):
- if ',' not in value:
+ if ',' not in value or '=' not in value:
return value
+
sub_dict = {}
for item in value.split(','):
k, v = item.rsplit('=', 1)
@@ -81,6 +82,7 @@ def parse_info(response):
except ValueError:
sub_dict[k] = v
return sub_dict
+
for line in response.splitlines():
if line and not line.startswith('#'):
key, value = line.split(':')