Skip to content

Commit

Permalink
Fixed key error in parse_xinfo_stream (#2788)
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-Parmar authored Jun 19, 2023
1 parent 4d396f8 commit 3cdecc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion redis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 3cdecc1

Please sign in to comment.