Fixed list index out of range issue for cv close dialog

Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
jitendracandela
2022-12-06 23:56:41 +05:30
parent 91c299049f
commit 55b8754f64

View File

@@ -333,10 +333,13 @@ class cv_test(Realm):
not_running = 0
while True:
cmd = "cv get_and_close_dialog"
dialog = self.run_cv_cmd(cmd)
if dialog[0]["LAST"]["response"] != "NO-DIALOG":
logger.info("Popup Dialog:\n")
logger.info(dialog[0]["LAST"]["response"])
try:
dialog = self.run_cv_cmd(cmd)
if dialog[0]["LAST"]["response"] != "NO-DIALOG":
logger.info("Popup Dialog:\n")
logger.info(dialog[0]["LAST"]["response"])
except Exception as e:
logger.info(str(e))
check = self.get_report_location(instance_name)
location = json.dumps(check[0]["LAST"]["response"])