def AddEvent(self, event):
    """Adds an event.

    Args:
      event (EventObject): event.

    Raises:
      IOError: when the storage writer is closed or
          if the event data identifier type is not supported.
      OSError: when the storage writer is closed or
          if the event data identifier type is not supported.
    """
    self._RaiseIfNotWritable()

    # TODO: change to no longer allow event_data_identifier is None
    # after refactoring every parser to generate event data.
    event_data_identifier = event.GetEventDataIdentifier()
    if event_data_identifier:
      if not isinstance(event_data_identifier, identifiers.FakeIdentifier):
        raise IOError('Unsupported event data identifier type: {0:s}'.format(
            type(event_data_identifier)))

    event = self._PrepareAttributeContainer(event)

    self._events.append(event)
    self.number_of_events += 1
def AddEvent ( self , event ) : self . _RaiseIfNotWritable ( ) event_data_identifier = event . GetEventDataIdentifier ( ) if event_data_identifier : if not isinstance ( event_data_identifier , identifiers . FakeIdentifier ) : raise IOError ( 'Unsupported event data identifier type: {0:s}' . format ( type ( event_data_identifier ) ) ) event = self . _PrepareAttributeContainer ( event ) self . _events . append ( event ) self . number_of_events += 1
Adds an event.

    Args:
      event (EventObject): event.

    Raises:
      IOError: when the storage writer is closed or
          if the event data identifier type is not supported.
      OSError: when the storage writer is closed or
          if the event data identifier type is not supported.