Skip to content

Commit b6c32eb

Browse files
committed
fixed possible bug in the get_stream
Signed-off-by: Alexander Piskun <[email protected]>
1 parent 99c1f76 commit b6c32eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nc_py_api/_session.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ def __del__(self):
152152
self.adapter.close()
153153

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

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

0 commit comments

Comments
 (0)