cc_module_9800_3504.py : updated to pass timeout to wifi_ctl_9800_3504.py

wifi_ctl_9800_3504 print out logg message of timeout value

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2022-06-03 09:35:40 -06:00
committed by shivam
parent 25942310de
commit be72696317
2 changed files with 7 additions and 2 deletions

View File

@@ -145,8 +145,8 @@ class create_controller_series_object:
self.port = port
if timeout is None:
logger.info("timeout not set default to 10 sec")
self.timeout = '10'
logger.info("timeout not set default to 3 sec")
self.timeout = '3'
else:
self.timeout = timeout
@@ -222,11 +222,13 @@ class create_controller_series_object:
self.command = ["./wifi_ctl_9800_3504.py", "--scheme", self.scheme, "--dest", self.dest,
"--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt,
"--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port,
"--timeout", self.timeout,
]
else:
self.command = [str(str(self.pwd) + "/wifi_ctl_9800_3504.py"), "--scheme", self.scheme, "--dest", self.dest,
"--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt,
"--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port,
"--timeout", self.timeout,
]
# Generate command

View File

@@ -221,6 +221,9 @@ def main():
console_handler = logging.StreamHandler()
formatter = logging.Formatter(FORMAT)
logg = logging.getLogger(__name__)
logg.info("wifi_ctl command timeout set to {timeout}".format(timeout=timeout))
# TODO Refactor for script to work must have output go to console_handler
# This does work since it is a subordinate to the root logger
# logg.setLevel(logging.DEBUG)