You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the cs-suite for Azure I get this following error:
File "/home/ubuntu/cs-suite/modules/azureaudit.py", line 1181, in vm_agent
log_data["data"] = log_data.pop("value")
KeyError: 'value'
I checked the code, and I found this:
azure_audit.py:1170ifcheck=='':
j_res['type'] ='WARNING'j_res['value'] ='The VM %s does not have virtual agent enabled'%(name)
else:
list=check.split()
iflist[1] =="Succeeded"andlist[0] !="":
j_res['type'] ='PASS'j_res['value'] ='The VM %s does have virtual agent enabled'% (name)
data.append(j_res)
log_data=dict()
log_data=j_reslog_data["data"] =log_data.pop("value")
This is problematic because if condition inside else has no else condition to default to.
I had to add the following else block to bypass this problem.
azure_audit.py:1170ifcheck=='':
j_res['type'] ='WARNING'j_res['value'] ='The VM %s does not have virtual agent enabled'%(name)
else:
list=check.split()
iflist[1] =="Succeeded"andlist[0] !="":
j_res['type'] ='PASS'j_res['value'] ='The VM %s does have virtual agent enabled'% (name)
# change made starts here:else:
j_res['type'] ='WARNING'j_res['value'] ='The VM %s does not have virtual agent enabled'%(name)
# change made ends heredata.append(j_res)
log_data=dict()
log_data=j_reslog_data["data"] =log_data.pop("value")
The text was updated successfully, but these errors were encountered:
When I run the cs-suite for Azure I get this following error:
I checked the code, and I found this:
This is problematic because if condition inside else has no else condition to default to.
I had to add the following else block to bypass this problem.
The text was updated successfully, but these errors were encountered: