File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,18 @@ def __init__(
3838 self .unsafe_terminate = unsafe_terminate
3939 self ._stack = AsyncExitStack ()
4040
41- self .other_init_params = kwargs or {}
41+ self .sftp_client_kwargs = {
42+ k : v
43+ for k , v in kwargs .items ()
44+ if k
45+ in {
46+ "env" ,
47+ "send_env" ,
48+ "path_encoding" ,
49+ "path_errors" ,
50+ "sftp_version" ,
51+ }
52+ }
4253
4354 async def _maybe_new_channel (self ):
4455 # If there is no hard limit or the limit is not hit yet
@@ -49,7 +60,7 @@ async def _maybe_new_channel(self):
4960 ):
5061 try :
5162 return await self ._stack .enter_async_context (
52- self .client .start_sftp_client (** self .other_init_params )
63+ self .client .start_sftp_client (** self .sftp_client_kwargs )
5364 )
5465 except ChannelOpenError :
5566 # If we can't create any more channels, then change
You can’t perform that action at this time.
0 commit comments