diff options
| author | Andy McCurdy <andy@andymccurdy.com> | 2018-11-02 15:51:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-02 15:51:22 -0700 |
| commit | 4bb0607995ff227ffec3ef460ed2a9b154bfe9c0 (patch) | |
| tree | 0a005c2b81d2842f8718be07b2b39a16c7f1f187 | |
| parent | cae1484ed1eb0e5b53c0c21ce7c7d3d96b0fb54f (diff) | |
| parent | fe4bb23415c6a40edfff97da6bfe0c313fb2f4f4 (diff) | |
| download | redis-py-4bb0607995ff227ffec3ef460ed2a9b154bfe9c0.tar.gz | |
Merge pull request #1018 from mzalimeni/info-support-colon-keys
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 a782b2c..733a6bc 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 |
