mirror of https://github.com/MISP/PyMISP
Fix misp API response content parsing
parent
889fa44e19
commit
650c87a534
|
@ -38,8 +38,8 @@ attr_cnt_duplicate = 0
|
||||||
attr_cnt_changed = 0
|
attr_cnt_changed = 0
|
||||||
yara_rules = []
|
yara_rules = []
|
||||||
yara_rule_names = []
|
yara_rule_names = []
|
||||||
if 'response' in result and 'Attribute' in result['response']:
|
if result.get('Attribute'):
|
||||||
for attribute in result['response']['Attribute']:
|
for attribute in result.get('Attribute'):
|
||||||
value = attribute['value']
|
value = attribute['value']
|
||||||
event_id = attribute['event_id']
|
event_id = attribute['event_id']
|
||||||
attribute_id = attribute['id']
|
attribute_id = attribute['id']
|
||||||
|
|
Loading…
Reference in New Issue