Skip to content

Commit 4f51205

Browse files
committed
fix: allow redirect for task result.
1 parent 966c705 commit 4f51205

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/sumo/wrapper/sumo_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ def get(self, path: str, params: Optional[Dict] = None) -> httpx.Response:
227227
path,
228228
)
229229
is not None
230+
or re.match(
231+
r"^/tasks\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/result$", # noqa: E501
232+
path,
233+
)
234+
is not None
230235
):
231236
follow_redirects = True
232237

@@ -542,6 +547,11 @@ async def get_async(
542547
path,
543548
)
544549
is not None
550+
or re.match(
551+
r"^/tasks\('[0-9a-fA-F-]{8}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{4}-[0-9a-fA-F-]{12}'\)/result$", # noqa: E501
552+
path,
553+
)
554+
is not None
545555
):
546556
follow_redirects = True
547557

0 commit comments

Comments
 (0)