Skip to content

Commit

Permalink
Merge pull request Kuadrant#302 from pehala/httpx_result_str
Browse files Browse the repository at this point in the history
Improve string representation of Result
  • Loading branch information
pehala authored Dec 6, 2023
2 parents b6ff76a + 9ab66bf commit db02f4b
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
Expand Up @@ -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"""
Expand Down

0 comments on commit db02f4b

Please sign in to comment.