mirror of https://github.com/MISP/PyMISP
Allow to get the list of known types out of MISPEvent again
parent
b3c15da967
commit
6dfaa78722
|
@ -255,6 +255,8 @@ class MISPEvent(AbstractMISP):
|
|||
t = json.load(f)
|
||||
describe_types = t['result']
|
||||
|
||||
self.__types = describe_types['types']
|
||||
|
||||
self._reinitialize_event()
|
||||
|
||||
def _reinitialize_event(self):
|
||||
|
@ -288,6 +290,9 @@ class MISPEvent(AbstractMISP):
|
|||
self.Galaxy = None
|
||||
self.Object = None
|
||||
|
||||
def get_known_types(self):
|
||||
return self.__types
|
||||
|
||||
def _serialize(self):
|
||||
return '{date}{threat_level_id}{info}{uuid}{analysis}{timestamp}'.format(
|
||||
date=self.date, threat_level_id=self.threat_level_id, info=self.info,
|
||||
|
|
Loading…
Reference in New Issue