Use from_dict

pull/196/head
Richard van den Berg 2018-02-26 11:25:14 +01:00
parent 6a3b05fd25
commit a04388f99a
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ def find_hashes(htype):
return
for a in r['response']['Attribute']:
attribute = MISPAttribute(mymisp.describe_types)
attribute.set_all_values(**a)
attribute.from_dict(**a)
if '|' in attribute.type and '|' in attribute.value:
c, value = attribute.value.split('|')
comment = '{} - {}'.format(attribute.comment, c)