From 0ba5abbaf08d069d705064868b95d41f0763d524 Mon Sep 17 00:00:00 2001 From: Shivam Thakur <70829776+shivamcandela@users.noreply.github.com> Date: Sat, 30 Oct 2021 13:59:11 +0800 Subject: [PATCH] try except added in cv test manager --- py-json/cv_test_manager.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/py-json/cv_test_manager.py b/py-json/cv_test_manager.py index 0c88e4ee..92532caf 100644 --- a/py-json/cv_test_manager.py +++ b/py-json/cv_test_manager.py @@ -395,12 +395,15 @@ class cv_test(Realm): break # Of if test stopped for some reason and could not generate report. - if not self.get_is_running(instance_name): - print("Detected test is not running.") - not_running += 1 - if not_running > 5: - break - + try: + if not self.get_is_running(instance_name): + print("Detected test is not running.") + not_running += 1 + if not_running > 5: + break + except Exception as e: + print(e) + time.sleep(1) self.report_name = self.get_report_location(instance_name) # Ensure test is closed and cleaned up