Skip to content

Commit

Permalink
Use list instead of tuple (Azure#10)
Browse files Browse the repository at this point in the history
* Use list instead of tuple.

* Apply suggestions from code review

Co-authored-by: Tibor Takacs <titakac@microsoft.com>
Co-authored-by: Jiashuo Li <jiasli@microsoft.com>
  • Loading branch information
3 people committed Aug 7, 2020
1 parent 74090f9 commit 4a6ab13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, authority=None, tenant_id=None, client_id=None, scopes=None,
self.allow_unencrypted = kwargs.pop('allow_unencrypted', True)
self.scopes = scopes
if self.scopes and not isinstance(self.scopes, (list, tuple)):
self.scopes = (self.scopes,)
self.scopes = [self.scopes]
self._msal_app_instance = None
# Store for Service principal credential persistence
self._msal_secret_store = MsalSecretStore(fallback_to_plaintext=self.allow_unencrypted)
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(self, cli_ctx=None, storage=None, auth_ctx_factory=None, use_global
self._client_id = client_id
self._msal_scopes = scopes or adal_resource_to_msal_scopes(self._ad_resource_uri)
if self._msal_scopes and not isinstance(self._msal_scopes, (list, tuple)):
self._msal_scopes = (self._msal_scopes,)
self._msal_scopes = [self._msal_scopes]

# pylint: disable=too-many-branches,too-many-statements
def login(self,
Expand Down

0 comments on commit 4a6ab13

Please sign in to comment.