Skip to content

Commit

Permalink
use the latest adal (Azure#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
yugangw-msft committed May 16, 2016
1 parent 1556033 commit ac698d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Binary file renamed libs/adal-0.2.2.zip → libs/adal-0.2.3rc1.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ vcrpy==1.7.4
colorama==0.3.7

# install adal from our libs dir
libs/adal-0.2.2.zip
libs/adal-0.2.3rc1.zip
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
]

DEPENDENCIES = [
'adal==0.2.2', # from libs/adal-*.zip
'adal==0.2.3rc1', # from libs/adal-*.zip
'applicationinsights',
'argcomplete',
'azure==2.0.0rc3',
Expand Down
7 changes: 5 additions & 2 deletions src/azure/cli/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ def get_login_credentials(self):
user_type = active_account[_USER_ENTITY][_USER_TYPE]
username_or_sp_id = active_account[_USER_ENTITY][_USER_NAME]
if user_type == _USER:
access_token = self._creds_cache.retrieve_token_for_user(username_or_sp_id,
active_account[_TENANT_ID])
try:
access_token = self._creds_cache.retrieve_token_for_user(username_or_sp_id,
active_account[_TENANT_ID])
except adal.AdalError as err:
raise CLIError(err)
else:
access_token = self._creds_cache.retrieve_token_for_service_principal(
username_or_sp_id)
Expand Down
4 changes: 2 additions & 2 deletions src/command_modules/azure-cli-profile/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python

#-------------------------------------------------------------------------
# Copyright (c) Microsoft. All rights reserved.
Expand Down Expand Up @@ -38,7 +38,7 @@

DEPENDENCIES = [
'azure==2.0.0rc3',
'adal==0.2.2', #from libs/adal-*.zip
'adal==0.2.3rc1', #from libs/adal-*.zip
]

with open('README.rst', 'r', encoding='utf-8') as f:
Expand Down

0 comments on commit ac698d7

Please sign in to comment.