Skip to content

Commit

Permalink
network client pass kwargs correctly to super().request
Browse files Browse the repository at this point in the history
this should permit us to pass filters as params from client side
  • Loading branch information
nucleogenesis committed Jul 22, 2024
1 parent 6ffde51 commit 5462947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kolibri/core/discovery/utils/network/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ def post(self, path, **kwargs):

def request(self, method, path, **kwargs):
response = None
if "timeout" not in kwargs:
kwargs.update(timeout=self.timeout)

timeout = kwargs.pop("timeout", self.timeout)

url = join_url(self.base_url, path)
try:
with super(NetworkClient, self).request(
method, url, stream=True, **kwargs
method, url, timeout=timeout, stream=True, params=kwargs
) as response:
if response.raw._connection.sock is None:
raise requests.exceptions.ConnectionError("No socket available")
Expand Down

0 comments on commit 5462947

Please sign in to comment.