fix(flr): 10.9 session list + download path (#1)

Co-authored-by: claude <[email protected]>
This commit was merged in pull request #1.
This commit is contained in:
2026-09-21 12:18:13 -04:00
committed by claude
parent 38ba9c1b50
commit 2473d22d2e
4 changed files with 69 additions and 21 deletions
+14 -10
View File
@@ -216,16 +216,20 @@ class ZertoClient:
)
async def fetch_download(self, token: str) -> bytes:
response = await self.request("GET", f"/v1/downloads/{token}")
if response.status_code >= 400:
# workflow also shows GET /v1/flrs/{token}
response = await self.request("GET", f"/v1/flrs/{token}")
if response.status_code >= 400:
raise ZertoError(
f"FLR download HTTP {response.status_code}: {response.text[:300]}",
status_code=response.status_code,
)
return response.content
token = str(token).strip().strip('"')
if token.startswith("v1/") or token.startswith("/v1/"):
paths = [token if token.startswith("/") else f"/{token}"]
else:
paths = [f"/v1/downloads/{token}", f"/v1/flrs/{token}"]
last = None
for path in paths:
last = await self.request("GET", path)
if last.status_code < 400:
return last.content
raise ZertoError(
f"FLR download HTTP {last.status_code if last else '?'}: {(last.text[:300] if last else '')}",
status_code=last.status_code if last else None,
)
async def end_flr(self, session_id: str) -> None:
try: