Skip to content

Commit

Permalink
Restore backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Nov 12, 2024
1 parent 0eef81e commit 0db50e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions elasticsearch/helpers/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def __reduce__(
class ScanError(Exception):
scroll_id: str

def __init__(self, scroll_id: str, shards_message: str) -> None:
super().__init__(shards_message)
def __init__(self, scroll_id: str, *args: Any) -> None:
super().__init__(*args)
self.scroll_id = scroll_id

def __reduce__(self) -> Tuple[Type["ScanError"], Tuple[str, str]]:
return (self.__class__, (self.scroll_id, self.args[0]))
return (self.__class__, (self.scroll_id,) + self.args)

0 comments on commit 0db50e4

Please sign in to comment.