Skip to content

Commit 9f4b981

Browse files
committed
Update general.py
1 parent 3f33bb3 commit 9f4b981

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fixprice_api/endpoints/general.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ async def download_image(
2626
attempts=retry_attempts, start_timeout=3.0, max_timeout=timeout
2727
)
2828

29+
px = self._parent.proxy if isinstance(self._parent.proxy, Proxy) else Proxy(self._parent.proxy)
2930
async with RetryClient(retry_options=retry_options) as retry_client:
3031
async with retry_client.get(
31-
url, raise_for_status=True, proxy=Proxy(self._parent.proxy).as_str()
32+
url, raise_for_status=True, proxy=px.as_str()
3233
) as resp:
3334
body = await resp.read()
3435
file = BytesIO(body)

0 commit comments

Comments
 (0)