(self)
Flush the current output file to the tar container.
Flush the current output file to the tar container.
Flush the current output file to the tar container .
def EndFile(self):
    """Flush the current output file to the tar container."""
    if self._current_file_data:
      info = tarfile.TarInfo(self._current_file_name)
      info.mtime = time.time()
      info.mode = 0o644
      data = self._current_file_data.getvalue()
      if not isinstance(data, bytes):
        data = data.encode('utf-8')
      info.size = len(data)
      self._tar.addfile(info, BytesIO(data))
      self._current_file_data.close()
      self._current_file_data = None
def EndFile ( self ) : if self . _current_file_data : info = tarfile . TarInfo ( self . _current_file_name ) info . mtime = time . time ( ) info . mode = 0o644 data = self . _current_file_data . getvalue ( ) if not isinstance ( data , bytes ) : data = data . encode ( 'utf-8' ) info . size = len ( data ) self . _tar . addfile ( info , BytesIO ( data ) ) self . _current_file_data . close ( ) self . _current_file_data = None