Skip to content

Commit

Permalink
Added better debug printing for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Tarves committed May 6, 2021
1 parent 7b3bbe1 commit a6c907a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions wyze_sdk/service/wyze_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ def validate(self):
WyzeApiError: The request to the Wyze API failed.
"""
if self._logger.level <= logging.DEBUG:
body = self.data if isinstance(self.data, dict) else "(binary)"
import json
body = json.dumps(self.data) if isinstance(self.data, dict) else "(binary)"
self._logger.debug(
"Received the following response - "
f"status: {self.status_code}\n"
f"headers: {dict(self.headers)}\n"
f"headers: {json.dumps(dict(self.headers))}\n"
f"body: {body}"
)
if (
Expand Down
2 changes: 1 addition & 1 deletion wyze_sdk/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"

0 comments on commit a6c907a

Please sign in to comment.