Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
cgtobi committed Nov 3, 2023
1 parent 46e8974 commit 4db324c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pyatmo/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ async def async_get_image(
headers=headers,
timeout=timeout,
) as resp:
resp_status = resp.status
resp_content = await resp.read()

if resp.headers.get("content-type") == "image/jpeg":
return resp_content

raise ApiError(
f"{resp_status} - "
f"{resp.status} - "
f"invalid content-type in response"
f"when accessing '{url}'",
)
Expand Down

0 comments on commit 4db324c

Please sign in to comment.