Merge branch 'ca-cert-compat' into 'master'

Don't break ca-bundle API just yet

See merge request poezio/slixmpp!178
This commit is contained in:
mathieui 2022-02-04 23:07:00 +01:00
commit d5502c9be7

View file

@ -771,6 +771,9 @@ class XMLStream(asyncio.BaseProtocol):
self.certfile, self.keyfile) self.certfile, self.keyfile)
if self.ca_certs is not None: if self.ca_certs is not None:
ca_cert: Optional[Path] = None ca_cert: Optional[Path] = None
# XXX: Compat before d733c54518.
if isinstance(self.ca_certs, str):
self.ca_certs = Path(self.ca_certs)
if isinstance(self.ca_certs, Path): if isinstance(self.ca_certs, Path):
if self.ca_certs.is_file(): if self.ca_certs.is_file():
ca_cert = self.ca_certs ca_cert = self.ca_certs