@@ -25,7 +25,7 @@ def create_tar_file(init_path: Path, tar_file: Path) -> None:
2525 init_path: The directory path to create the tar file from.
2626 tar_file: The output tar file path.
2727 """
28- with tarfile .open (tar_file , "w:gz " ) as tar :
28+ with tarfile .open (tar_file , "w" ) as tar :
2929 tar .add (str (init_path ), arcname = "." )
3030
3131
@@ -44,7 +44,7 @@ def _response_from_tar(self, tar_file: Path) -> FileResponse:
4444 fs = FileSystemStorage (str (tar_file .parent ))
4545 response = FileResponse (
4646 fs .open (tar_file .name , "rb" ),
47- content_type = "application/tar+gzip " ,
47+ content_type = "application/tar" ,
4848 status = 201 ,
4949 )
5050 response ["Content-Disposition" ] = f'attachment; filename="{ tar_file .name } "'
@@ -156,7 +156,7 @@ def collection(self, collection: str, project: str) -> Path:
156156 project = project ,
157157 )
158158 Init (config ).run ()
159- tar_file = self .tmp_dir / f"{ collection } .tar.gz "
159+ tar_file = self .tmp_dir / f"{ collection } .tar"
160160 create_tar_file (init_path , tar_file )
161161 return tar_file
162162
@@ -187,6 +187,6 @@ def playbook(
187187 subcommand = "init" ,
188188 )
189189 Init (config ).run ()
190- tar_file = self .tmp_dir / f"{ namespace } -{ collection_name } .tar.gz "
190+ tar_file = self .tmp_dir / f"{ namespace } -{ collection_name } .tar"
191191 create_tar_file (init_path , tar_file )
192192 return tar_file
0 commit comments