(self, encapsulate_errors: bool)
| 104 | return (b"&".join([b"".join(res.strings) for res in results])).decode("utf-8") # type: ignore[attr-defined] |
| 105 | |
| 106 | async def _resolve_uri(self, encapsulate_errors: bool) -> resolver.Answer: |
| 107 | try: |
| 108 | results = await _resolve( |
| 109 | "_" + self.__srv + "._tcp." + self.__fqdn, "SRV", lifetime=self.__connect_timeout |
| 110 | ) |
| 111 | except Exception as exc: |
| 112 | if not encapsulate_errors: |
| 113 | # Raise the original error. |
| 114 | raise |
| 115 | # Else, raise all errors as ConfigurationError. |
| 116 | raise ConfigurationError(str(exc)) from exc |
| 117 | return results |
| 118 | |
| 119 | async def _get_srv_response_and_hosts( |
| 120 | self, encapsulate_errors: bool |
no test coverage detected