grr/server/grr_response_server/gui/archive_generator_aff4.py
def _GenerateDescription(self):
    """Generates description into a MANIFEST file in the archive."""

    manifest = {
        "description": self.description,
        "processed_files": self.total_files,
        "archived_files": len(self.archived_files),
        "ignored_files": len(self.ignored_files),
        "failed_files": len(self.failed_files)
    }
    if self.ignored_files:
      manifest["ignored_files_list"] = list(self.ignored_files)
    if self.failed_files:
      manifest["failed_files_list"] = list(self.failed_files)

    manifest_fd = io.BytesIO()
    if self.total_files != len(self.archived_files):
      manifest_fd.write(self.FILES_SKIPPED_WARNING)
    manifest_fd.write(yaml.Dump(manifest).encode("utf-8"))

    manifest_fd.seek(0)
    st = os.stat_result((0o644, 0, 0, 0, 0, 0, len(manifest_fd.getvalue()), 0,
                         0, 0))

    for chunk in self.archive_generator.WriteFromFD(
        manifest_fd, os.path.join(self.prefix, "MANIFEST"), st=st):
      yield chunk
Generates description into a MANIFEST file in the archive.
Generates description into a MANIFEST file in the archive.
Generates description into a MANIFEST file in the archive .
def _GenerateDescription(self):
    manifest = {
        "description": self.description,
        "processed_files": self.total_files,
        "archived_files": len(self.archived_files),
        "ignored_files": len(self.ignored_files),
        "failed_files": len(self.failed_files)
    }
    if self.ignored_files:
      manifest["ignored_files_list"] = list(self.ignored_files)
    if self.failed_files:
      manifest["failed_files_list"] = list(self.failed_files)
    manifest_fd = io.BytesIO()
    if self.total_files != len(self.archived_files):
      manifest_fd.write(self.FILES_SKIPPED_WARNING)
    manifest_fd.write(yaml.Dump(manifest).encode("utf-8"))
    manifest_fd.seek(0)
    st = os.stat_result((0o644, 0, 0, 0, 0, 0, len(manifest_fd.getvalue()), 0,
                         0, 0))
    for chunk in self.archive_generator.WriteFromFD(
        manifest_fd, os.path.join(self.prefix, "MANIFEST"), st=st):
      yield chunk
def _GenerateDescription ( self ) : manifest = { "description" : self . description , "processed_files" : self . total_files , "archived_files" : len ( self . archived_files ) , "ignored_files" : len ( self . ignored_files ) , "failed_files" : len ( self . failed_files ) } if self . ignored_files : manifest [ "ignored_files_list" ] = list ( self . ignored_files ) if self . failed_files : manifest [ "failed_files_list" ] = list ( self . failed_files ) manifest_fd = io . BytesIO ( ) if self . total_files != len ( self . archived_files ) : manifest_fd . write ( self . FILES_SKIPPED_WARNING ) manifest_fd . write ( yaml . Dump ( manifest ) . encode ( "utf-8" ) ) manifest_fd . seek ( 0 ) st = os . stat_result ( ( 0o644 , 0 , 0 , 0 , 0 , 0 , len ( manifest_fd . getvalue ( ) ) , 0 , 0 , 0 ) ) for chunk in self . archive_generator . WriteFromFD ( manifest_fd , os . path . join ( self . prefix , "MANIFEST" ) , st = st ) : yield chunk
Generates description into a MANIFEST file in the archive.
Generates description into a MANIFEST file in the archive .
"""Generates description into a MANIFEST file in the archive."""
self