mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-11-01 19:37:54 +00:00
cloudsdk: Add try/catch debugging around fw update error.
At least some of the time this code throws exception, add some logging. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -377,8 +377,20 @@ class CloudSDK:
|
|||||||
if status_code == 200:
|
if status_code == 200:
|
||||||
status_data = status_response.json()
|
status_data = status_response.json()
|
||||||
# print(status_data)
|
# print(status_data)
|
||||||
|
try:
|
||||||
current_ap_fw = status_data[2]['details']['reportedSwVersion']
|
current_ap_fw = status_data[2]['details']['reportedSwVersion']
|
||||||
return current_ap_fw
|
return current_ap_fw
|
||||||
|
except Exception as ex:
|
||||||
|
ap_cli_info = "ERROR"
|
||||||
|
print(ex)
|
||||||
|
logging.error(logging.traceback.format_exc())
|
||||||
|
if not self.verbose:
|
||||||
|
# Force full logging for this, result is not as expected.
|
||||||
|
self.verbose = true;
|
||||||
|
self.check_response("GET", status_response, headers, payload, equip_fw_url)
|
||||||
|
self.verbose = False
|
||||||
|
return ("ERROR")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return ("ERROR")
|
return ("ERROR")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user