def AddEventSource(self, event_source):
    """Adds an event source.

    Args:
      event_source (EventSource): an event source.

    Raises:
      IOError: when the storage writer is closed.
      OSError: when the storage writer is closed.
    """
    self._RaiseIfNotWritable()

    self._storage_file.AddEventSource(event_source)
    self.number_of_event_sources += 1
def AddEventSource ( self , event_source ) : self . _RaiseIfNotWritable ( ) self . _storage_file . AddEventSource ( event_source ) self . number_of_event_sources += 1
Adds an event source.

    Args:
      event_source (EventSource): an event source.

    Raises:
      IOError: when the storage writer is closed.
      OSError: when the storage writer is closed.