Skip to content

Commit

Permalink
fixed possible bug in the get_stream
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Sep 26, 2023
1 parent 99c1f76 commit b6c32eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nc_py_api/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,9 @@ def __del__(self):
self.adapter.close()

def get_stream(self, path: str, params: Optional[dict] = None, **kwargs) -> Iterator[Response]:
headers = kwargs.pop("headers", {})
return self._get_stream(
f"{quote(path)}?{urlencode(params, True)}" if params else quote(path), kwargs.get("headers", {}), **kwargs
f"{quote(path)}?{urlencode(params, True)}" if params else quote(path), headers=headers, **kwargs
)

def _get_stream(self, path_params: str, headers: dict, **kwargs) -> Iterator[Response]:
Expand Down

0 comments on commit b6c32eb

Please sign in to comment.