test: fix indentation in rsync error handling

This commit is contained in:
2026-07-05 18:46:45 +02:00
parent 895927fbad
commit b680a8dff4
+9 -9
View File
@@ -344,15 +344,15 @@ path = {source_dir}
entry["status"] = "Failed" entry["status"] = "Failed"
errors = [] errors = []
if rsync_result.returncode != 0: if rsync_result.returncode != 0:
errs = [] errs = []
if rsync_result.stderr: if rsync_result.stderr:
errs.append(rsync_result.stderr.strip().split("\n")[0]) errs.append(rsync_result.stderr.strip().split("\n")[0])
if rsync_result.stdout: if rsync_result.stdout:
errs.append(rsync_result.stdout.strip().split("\n")[0]) errs.append(rsync_result.stdout.strip().split("\n")[0])
if not errs: if not errs:
errs.append("No output") errs.append("No output")
err = " | ".join(errs) err = " | ".join(errs)
errors.append(f"Exit code {rsync_result.returncode}: {err[:150]}") errors.append(f"Exit code {rsync_result.returncode}: {err[:150]}")
if missing: if missing:
errors.append(f"Missing ({len(missing)}): {', '.join(missing[:5])}") errors.append(f"Missing ({len(missing)}): {', '.join(missing[:5])}")
if mismatches: if mismatches: