Skip to content

Commit

Permalink
Honor the anon parameter if set (#468)
Browse files Browse the repository at this point in the history
If the anon parameter is set, it should be used over any environment variables set.
  • Loading branch information
adam-roughton authored Apr 15, 2024
1 parent 777a8d5 commit 5c24b2e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions adlfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,14 @@ def __init__(
self.client_id = client_id or os.getenv("AZURE_STORAGE_CLIENT_ID")
self.client_secret = client_secret or os.getenv("AZURE_STORAGE_CLIENT_SECRET")
self.tenant_id = tenant_id or os.getenv("AZURE_STORAGE_TENANT_ID")
self.anon = anon or os.getenv("AZURE_STORAGE_ANON", "true").lower() not in [
"false",
"0",
"f",
]
if anon is not None:
self.anon = anon
else:
self.anon = os.getenv("AZURE_STORAGE_ANON", "true").lower() not in [
"false",
"0",
"f",
]
self.location_mode = location_mode
self.credential = credential
self.request_session = request_session
Expand Down

0 comments on commit 5c24b2e

Please sign in to comment.