From 120746eda312b1dab0460b15c113261bcb34690f Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 15 Jan 2017 19:48:36 +0200 Subject: hotfix for get model - does not work on regression Signed-off-by: Hanoh Haim --- scripts/automation/regression/stateful_tests/trex_general_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/automation/regression/stateful_tests/trex_general_test.py b/scripts/automation/regression/stateful_tests/trex_general_test.py index 24c38783..64f27141 100755 --- a/scripts/automation/regression/stateful_tests/trex_general_test.py +++ b/scripts/automation/regression/stateful_tests/trex_general_test.py @@ -97,9 +97,11 @@ class CTRexGeneral_Test(unittest.TestCase): CTRexScenario.router.load_platform_data_from_file(device_cfg) CTRexScenario.router.launch_connection(device_cfg) if CTRexScenario.router_cfg['forceImageReload']: - running_image = CTRexScenario.router.get_running_image_details()['image'] - setup['dut'] =CTRexScenario.router.get_running_image_details()['model'] + image_d=CTRexScenario.router.get_running_image_details(); + running_image = image_d['image'] + setup['dut'] =image_d.get('model','router'); print('Current router image: %s' % running_image) + print('Current router model : %s' % setup['dut']) needed_image = device_cfg.get_image_name() if not CTRexScenario.router.is_image_matches(needed_image): print('Setting router image: %s' % needed_image) -- cgit 1.2.3-korg