From e344addd614aca3a00fcb54671f41fa64514638e Mon Sep 17 00:00:00 2001 From: Sai Asish Y Date: Thu, 30 Apr 2026 12:22:37 -0700 Subject: [PATCH] fix(backups): pass both stdout and stderr to _extract_error_message in _list_timelines `_extract_error_message` is declared as @staticmethod def _extract_error_message(stdout: str, stderr: str) -> str: Every other call site in src/backups.py (lines 214, 457, 531, 747, 811, 1028, 1195) supplies both arguments. The `_list_timelines` call at line 570 was the lone exception: extracted_error = self._extract_error_message(stderr) so whenever `pgbackrest repo-ls` returned a non-zero exit code, the error path raised TypeError: _extract_error_message() missing 1 required positional argument: 'stderr' instead of the intended ListBackupsError, masking the underlying backup failure. Pass the local `output` (stdout) variable as the first argument to match the surrounding convention. Closes #1482. Signed-off-by: SAY-5 Signed-off-by: Sai Asish Y --- src/backups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backups.py b/src/backups.py index e983c61ecf7..2c6dc51c339 100644 --- a/src/backups.py +++ b/src/backups.py @@ -567,7 +567,7 @@ def _list_timelines(self) -> dict[str, tuple[str, str]]: "--output=json", ]) if return_code != 0: - extracted_error = self._extract_error_message(stderr) + extracted_error = self._extract_error_message(output, stderr) raise ListBackupsError(f"Failed to list repository with error: {extracted_error}") repository = json.loads(output).items()