Skip to content

Commit

Permalink
Merge pull request #305 from MattCatz/parameters
Browse files Browse the repository at this point in the history
: pass parameters if given initial_input
  • Loading branch information
carlmontanari authored Oct 25, 2023
2 parents d0eb38b + 984b8b4 commit 4ae027a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion scrapli/driver/generic/async_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,13 @@ def callback_two(cls: GenericDriver, read_output: str):
"""
if initial_input is not None:
self.channel.write(channel_input=f"{initial_input}{self.comms_return_char}")
return await self.read_callback(callbacks=callbacks, initial_input=None)
return await self.read_callback(
callbacks=callbacks,
initial_input=None,
read_output=read_output,
read_delay=read_delay,
read_timeout=read_timeout,
)

original_transport_timeout = self.timeout_transport

Expand Down
8 changes: 7 additions & 1 deletion scrapli/driver/generic/sync_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,13 @@ def callback_two(cls: GenericDriver, read_output: str):
"""
if initial_input is not None:
self.channel.write(channel_input=f"{initial_input}{self.comms_return_char}")
return self.read_callback(callbacks=callbacks, initial_input=None)
return self.read_callback(
callbacks=callbacks,
initial_input=None,
read_output=read_output,
read_delay=read_delay,
read_timeout=read_timeout,
)

original_transport_timeout = self.timeout_transport

Expand Down

0 comments on commit 4ae027a

Please sign in to comment.