Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
[Fix] json as list (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
kagrski authored Apr 13, 2023
1 parent 0798bf4 commit c1dcc69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vmngclient"
version = "0.8.1"
version = "0.8.2"
description = "Universal vManage API"
authors = ["kagorski <[email protected]>"]
readme = "README.md"
Expand Down
5 changes: 4 additions & 1 deletion vmngclient/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def response_debug(response: Optional[Response], request: Union[Request, Prepare
}
try:
json = response.json()
json.pop("header", None)

if isinstance(json, dict):
json.pop("header", None)

response_debug.update({"json": json})
except JSONDecodeError:
if response.encoding is not None:
Expand Down

0 comments on commit c1dcc69

Please sign in to comment.