Skip to content

Commit 3dc4152

Browse files
PIM-7684: Recover raises RecoverError when files_processed is 0
Override _task_complete in Recover to detect edge case where portal reports task as completed but processed zero files, ensuring RecoverError is raised consistently for all failure modes. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 99746a1 commit 3dc4152

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cterasdk/cio/core/commands.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,11 @@ class Recover(MultiResourceCommand):
10431043
def _progress_str(self):
10441044
return 'Recovering'
10451045

1046+
def _task_complete(self, task):
1047+
if getattr(task, 'files_processed', None) == 0:
1048+
return self._task_error(task)
1049+
return super()._task_complete(task)
1050+
10461051
def _task_error(self, task):
10471052
cursor = task.cursor
10481053
raise exceptions.io.core.RecoverError(self.paths, cursor)

0 commit comments

Comments
 (0)