diff --git a/py-scripts/tip-cicd-sanity/Nightly_Sanity.py b/py-scripts/tip-cicd-sanity/Nightly_Sanity.py index ce3b9aa1..34228e29 100755 --- a/py-scripts/tip-cicd-sanity/Nightly_Sanity.py +++ b/py-scripts/tip-cicd-sanity/Nightly_Sanity.py @@ -1874,7 +1874,7 @@ for key in ap_models: passed_tests = sum(x == "passed" for x in report_data["tests"][key].values()) failed_tests = sum(y == "failed" for y in report_data["tests"][key].values()) error_tests = sum(z == "error" for z in report_data["tests"][key].values()) - no_of_tests = passed_tests + failed_tests + error_tests + no_of_tests = len(case_ids) if no_of_tests == 0: print("No tests run for", key) else: diff --git a/py-scripts/tip-cicd-sanity/cloudsdk.py b/py-scripts/tip-cicd-sanity/cloudsdk.py index 6128ab71..d97bfd54 100755 --- a/py-scripts/tip-cicd-sanity/cloudsdk.py +++ b/py-scripts/tip-cicd-sanity/cloudsdk.py @@ -72,10 +72,15 @@ class CloudSDK: if status_code is 200: status_data = status_response.json() #print(status_data) - current_ap_fw = status_data[2]['details']['reportedSwVersion'] - return current_ap_fw + try: + current_ap_fw = status_data[2]['details']['reportedSwVersion'] + return current_ap_fw + except: + current_ap_fw = "error" + return "ERROR" + else: - return("ERROR") + return "ERROR" def CloudSDK_images(apModel, cloudSDK_url, bearer): getFW_url = cloudSDK_url+"/portal/firmware/version/byEquipmentType?equipmentType=AP&modelId=" + apModel