mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-10-31 19:08:01 +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:
|
||||
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 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:
|
||||
return ("ERROR")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user