Minor bug fixes

This commit is contained in:
bealler
2021-01-31 12:56:21 -05:00
parent abbc1476d3
commit edb9c693c3
2 changed files with 9 additions and 4 deletions

View File

@@ -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