summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py
index 07df19a..0b9863f 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -276,9 +276,11 @@ def parse_xclaim(response, **options):
def parse_xinfo_stream(response):
data = pairs_to_dict(response, decode_keys=True)
first = data['first-entry']
- data['first-entry'] = (first[0], pairs_to_dict(first[1]))
+ if first is not None:
+ data['first-entry'] = (first[0], pairs_to_dict(first[1]))
last = data['last-entry']
- data['last-entry'] = (last[0], pairs_to_dict(last[1]))
+ if last is not None:
+ data['last-entry'] = (last[0], pairs_to_dict(last[1]))
return data