Skip to content

Commit

Permalink
fix azure service bus isinstance check (#2053)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwbarnett committed Jul 10, 2024
1 parent 183c873 commit 52d8b7f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kombu/transport/azureservicebus.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ def _try_parse_connection_string(self) -> None:
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:
Expand Down

0 comments on commit 52d8b7f

Please sign in to comment.