|
9 | 9 | from binascii import hexlify |
10 | 10 | from typing import Any, NamedTuple, Optional |
11 | 11 |
|
12 | | -from azure.identity import AzureCliCredential, CredentialUnavailableError |
13 | 12 | import jwt |
14 | 13 | import msal |
15 | 14 | import requests |
| 15 | +from azure.identity import AzureCliCredential, CredentialUnavailableError |
16 | 16 | from cryptography import x509 |
17 | 17 | from cryptography.hazmat.backends import default_backend |
18 | 18 | from cryptography.hazmat.primitives import hashes, serialization |
@@ -491,7 +491,9 @@ def _acquire_token_from_azure_cli(self, scope: list[str]) -> dict: |
491 | 491 | current_tenant = self._get_azure_cli_tenant() |
492 | 492 | if current_tenant and current_tenant != stored_tenant: |
493 | 493 | raise FabricCLIError( |
494 | | - ErrorMessages.Auth.azure_cli_tenant_mismatch(stored_tenant, current_tenant), |
| 494 | + ErrorMessages.Auth.azure_cli_tenant_mismatch( |
| 495 | + stored_tenant, current_tenant |
| 496 | + ), |
495 | 497 | status_code=con.ERROR_AUTHENTICATION_FAILED, |
496 | 498 | ) |
497 | 499 |
|
@@ -522,8 +524,7 @@ def _acquire_token_from_azure_cli(self, scope: list[str]) -> dict: |
522 | 524 | status_code=con.ERROR_AUTHENTICATION_FAILED, |
523 | 525 | ) |
524 | 526 | except Exception as e: |
525 | | - # Allowlist: SDK exceptions are pre-sanitized by azure-identity; |
526 | | - # unknown exceptions get a safe generic message. |
| 527 | + # Allowlist: SDK exceptions are pre-sanitized by azure-identity; unknown exceptions get a safe generic message |
527 | 528 | if type(e).__name__ in ("ClientAuthenticationError", "HttpResponseError"): |
528 | 529 | error_msg = str(e) |
529 | 530 | else: |
|
0 commit comments