Skip to content

Commit

Permalink
Improve string representation of Result
Browse files Browse the repository at this point in the history
  • Loading branch information
pehala committed Dec 5, 2023

Verified

This commit was signed with the committer’s verified signature.
mike182uk Michael Barrett
1 parent 7788a6e commit 9ab66bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testsuite/httpx/__init__.py
Original file line number Diff line number Diff line change
@@ -58,6 +58,11 @@ def __getattr__(self, item):
return getattr(self.response, item)
return None

def __str__(self):
if self.error is None:
return f"Result[status_code={self.response.status_code}]"
return f"Result[error={self.error}]"


class KuadrantClient(Client):
"""Httpx client which retries unstable requests"""

0 comments on commit 9ab66bf

Please sign in to comment.