diff --git a/CHANGES b/CHANGES index 7fd510bd12..76b3393aa2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ + * Fix #2768, Fix KeyError: 'first-entry' in parse_xinfo_stream. * Fix #2749, remove unnecessary __del__ logic to close connections. * Fix #2754, adding a missing argument to SentinelManagedConnection * Fix `xadd` command to accept non-negative `maxlen` including 0 diff --git a/redis/client.py b/redis/client.py index 9fd5b7ca9e..ab626ccdf4 100755 --- a/redis/client.py +++ b/redis/client.py @@ -320,7 +320,7 @@ def parse_xautoclaim(response, **options): def parse_xinfo_stream(response, **options): data = pairs_to_dict(response, decode_keys=True) if not options.get("full", False): - first = data["first-entry"] + first = data.get("first-entry") if first is not None: data["first-entry"] = (first[0], pairs_to_dict(first[1])) last = data["last-entry"]