mirror of https://github.com/MISP/PyMISP
chg: More flexible when an event is in a weird state.
parent
a1e96731b2
commit
337d9a6306
|
@ -63,8 +63,12 @@ if __name__ == '__main__':
|
||||||
counter = 1
|
counter = 1
|
||||||
total = len(events)
|
total = len(events)
|
||||||
for event in events:
|
for event in events:
|
||||||
e = misp.get_event(event.uuid, pythonify=True)
|
try:
|
||||||
e_feed = e.to_feed(valid_distributions=valid_attribute_distributions, with_meta=True)
|
e = misp.get_event(event.uuid, pythonify=True)
|
||||||
|
e_feed = e.to_feed(valid_distributions=valid_attribute_distributions, with_meta=True)
|
||||||
|
except Exception as e:
|
||||||
|
print(e, event.uuid)
|
||||||
|
continue
|
||||||
if not e_feed:
|
if not e_feed:
|
||||||
print(f'Invalid distribution {e.distribution}, skipping')
|
print(f'Invalid distribution {e.distribution}, skipping')
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue