From 984b8b48b98859bd37786d039a4e2f98f1e0e249 Mon Sep 17 00:00:00 2001 From: Matthew Cather Date: Wed, 25 Oct 2023 17:13:28 -0500 Subject: [PATCH] : pass parameters if given initial_input --- scrapli/driver/generic/async_driver.py | 8 +++++++- scrapli/driver/generic/sync_driver.py | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/scrapli/driver/generic/async_driver.py b/scrapli/driver/generic/async_driver.py index 84b8dcfd..9c98ea69 100644 --- a/scrapli/driver/generic/async_driver.py +++ b/scrapli/driver/generic/async_driver.py @@ -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 diff --git a/scrapli/driver/generic/sync_driver.py b/scrapli/driver/generic/sync_driver.py index 6f855ef7..9b832e13 100644 --- a/scrapli/driver/generic/sync_driver.py +++ b/scrapli/driver/generic/sync_driver.py @@ -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