fix azure service bus isinstance check (#2053)

This commit is contained in:
Jason Barnett 2024-07-10 17:59:40 -06:00 committed by GitHub
parent 183c873519
commit 52d8b7f0d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -141,8 +141,13 @@ class Channel(virtual.Channel):
self._namespace, self._credential = Transport.parse_uri(
self.conninfo.hostname)
if (isinstance(self._credential, DefaultAzureCredential) or
isinstance(self._credential, ManagedIdentityCredential)):
if (
DefaultAzureCredential is not None
and isinstance(self._credential, DefaultAzureCredential)
) or (
ManagedIdentityCredential is not None
and isinstance(self._credential, ManagedIdentityCredential)
):
return None
if ":" in self._credential: