(patch_path)
return gzipped_path
Gzips the file on patch_path.

  Args:
    patch_path: path to the input file

  Returns:
    path to the gzipped input file
Gzips the file on patch_path.
Gzips the file on patch_path .
def gzip(patch_path):
  """Gzips the file on patch_path.

  Args:
    patch_path: path to the input file

  Returns:
    path to the gzipped input file
  """
  check_exists(patch_path)
  in_file = open(patch_path, 'r')

  gzipped_path = patch_path + ".gz"
  out_file = open(gzipped_path, 'w')
  run_command([gzip_path, '-9'], stdin=in_file, stdout=out_file)
  in_file.close()
  out_file.close()
  return gzipped_path
def gzip ( patch_path ) : check_exists ( patch_path ) in_file = open ( patch_path , 'r' ) gzipped_path = patch_path + ".gz" out_file = open ( gzipped_path , 'w' ) run_command ( [ gzip_path , '-9' ] , stdin = in_file , stdout = out_file ) in_file . close ( ) out_file . close ( ) return gzipped_path