Skip to content

Commit

Permalink
fix endpoint not set (#14664)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzhou-msft authored Aug 6, 2020
1 parent 959166f commit 58c9f78
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/azure-cli-core/azure/cli/core/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,12 @@ def get_sp_auth_info(self, subscription_id=None, name=None, password=None, cert_
endpoint_mappings['sql_management'] = 'sqlManagementEndpointUrl'
endpoint_mappings['gallery'] = 'galleryEndpointUrl'
endpoint_mappings['management'] = 'managementEndpointUrl'

from azure.cli.core.cloud import CloudEndpointNotSetException
for e in endpoint_mappings:
result[endpoint_mappings[e]] = getattr(get_active_cloud(self.cli_ctx).endpoints, e)
try:
result[endpoint_mappings[e]] = getattr(get_active_cloud(self.cli_ctx).endpoints, e)
except CloudEndpointNotSetException:
result[endpoint_mappings[e]] = None
return result

def get_installation_id(self):
Expand Down

0 comments on commit 58c9f78

Please sign in to comment.