original_docstring: Create archive from the given attribute/metadata files and save it to out_file.
docstring: Create archive from the given attribute/metadata files and save it to out_file.
docstring_tokens: Create archive from the given attribute / metadata files and save it to out_file .
code: def create_archive(export_directory, out_file, gzip=False):
      """Create archive from the given attribute/metadata files and save it to out_file."""
      try:
          tar_export_directory(export_directory, out_file, gzip)
          # Status.
          print('Created history archive.')
          return 0
      except Exception as e:
          print(f'Error creating history archive: {unicodify(e)}', file=sys.stderr)
          return 1
      finally:
          shutil.rmtree(export_directory, ignore_errors=True)
code_tokens: def create_archive ( export_directory , out_file , gzip = False ) : try : tar_export_directory ( export_directory , out_file , gzip ) print ( 'Created history archive.' ) return 0 except Exception as e : print ( f'Error creating history archive: {unicodify(e)}' , file = sys . stderr ) return 1 finally : shutil . rmtree ( export_directory , ignore_errors = True )
short_docstring: Create archive from the given attribute/metadata files and save it to out_file.
short_docstring_tokens: Create archive from the given attribute / metadata files and save it to out_file .
comment: """Create archive from the given attribute/metadata files and save it to out_file."""$SEP$# Status.