Skip to content

Commit

Permalink
Fixed returns on failed files for ARCHIVE_GET
Browse files Browse the repository at this point in the history
  • Loading branch information
nmassey001 committed Dec 19, 2024
1 parent f6a351b commit 87f16bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nlds_processors/archive/s3_to_tarfile_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def put(
self.filelist_hash = self._generate_filelist_hash()
completelist, failedlist = self._check_files_exist()
if len(failedlist) > 0:
return [], failedlist, None
return [], failedlist, "", 0

# make or find the holding folder on the disk
try:
Expand Down Expand Up @@ -147,7 +147,7 @@ def get(
tarfile: str,
filelist: List[PathDetails],
chunk_size: int,
) -> tuple[List[PathDetails], List[PathDetails], str, int]:
) -> tuple[List[PathDetails], List[PathDetails]]:
"""Stream from a tarfile on disk to Object Store"""
if self.filelist != []:
raise ValueError(f"self.filelist is not Empty: {self.filelist[0]}")
Expand Down
2 changes: 1 addition & 1 deletion nlds_processors/archive/s3_to_tarfile_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def get(
tarfile: str,
filelist: List[PathDetails],
chunk_size: int,
) -> tuple[List[PathDetails], List[PathDetails], str, int]:
) -> tuple[List[PathDetails], List[PathDetails]]:
raise NotImplementedError

@abstractmethod
Expand Down
4 changes: 2 additions & 2 deletions nlds_processors/archive/s3_to_tarfile_tape.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def put(
self.filelist_hash = self._generate_filelist_hash()
completelist, failedlist = self._check_files_exist()
if len(failedlist) > 0:
return [], failedlist, None
return [], failedlist, "", 0

# Make or find holding folder on the tape server
status, _ = self.tape_client.mkdir(self.holding_tapepath, MkDirFlags.MAKEPATH)
Expand Down Expand Up @@ -165,7 +165,7 @@ def get(
tarfile: str,
filelist: List[PathDetails],
chunk_size: int,
) -> tuple[List[PathDetails], List[PathDetails], str, int]:
) -> tuple[List[PathDetails], List[PathDetails]]:
"""Stream from a tarfile on tape to Object Store"""
if self.filelist != []:
raise ValueError(f"self.filelist is not Empty: {self.filelist[0]}")
Expand Down

0 comments on commit 87f16bd

Please sign in to comment.