diff options
author | andy <andy@andymccurdy.com> | 2012-01-13 13:47:42 -0800 |
---|---|---|
committer | andy <andy@andymccurdy.com> | 2012-01-13 13:47:42 -0800 |
commit | 485a7918bb91846c219ff3213ec2d6e66b40e8ae (patch) | |
tree | df3d002ccaa929b8c3176d71f1ddbbb3b70cda4c /redis/client.py | |
parent | 60e3be561417b3252d832c9fb45bf6072e3ccce8 (diff) | |
download | redis-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.py | 4 |
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(':') |