Skip to content

Commit 9c03f6a

Browse files
committed
fix
1 parent 4175540 commit 9c03f6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyiceberg/io/fsspec.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,12 @@ def _adls(properties: Properties) -> AbstractFileSystem:
197197
from adlfs import AzureBlobFileSystem
198198

199199
# https://learn.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri#uri-syntax
200-
account_uri = None
201-
if not properties.get(ADLS_ACCOUNT_NAME) and (netloc := properties.get("netloc")):
200+
if netloc := properties.get("netloc"):
202201
account_uri = netloc.split("@")[-1]
202+
else:
203+
account_uri = None
204+
205+
if not properties.get(ADLS_ACCOUNT_NAME) and account_uri:
203206
properties[ADLS_ACCOUNT_NAME] = account_uri.split(".")[0]
204207

205208
# Fixes https://github.com/apache/iceberg-python/issues/1146

0 commit comments

Comments
 (0)