Skip to content

Commit 3cdecc1

Browse files
authored
Fixed key error in parse_xinfo_stream (#2788)
1 parent 4d396f8 commit 3cdecc1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Fix #2768, Fix KeyError: 'first-entry' in parse_xinfo_stream.
12
* Fix #2749, remove unnecessary __del__ logic to close connections.
23
* Fix #2754, adding a missing argument to SentinelManagedConnection
34
* Fix `xadd` command to accept non-negative `maxlen` including 0

redis/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def parse_xautoclaim(response, **options):
320320
def parse_xinfo_stream(response, **options):
321321
data = pairs_to_dict(response, decode_keys=True)
322322
if not options.get("full", False):
323-
first = data["first-entry"]
323+
first = data.get("first-entry")
324324
if first is not None:
325325
data["first-entry"] = (first[0], pairs_to_dict(first[1]))
326326
last = data["last-entry"]

0 commit comments

Comments
 (0)