Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Support account_host and check blob size attribute exists" #352

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 8 additions & 19 deletions adlfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,16 +624,10 @@ def do_connect(self):
self.service_client = AIOBlobServiceClient.from_connection_string(
conn_str=self.connection_string
)
elif self.account_name is not None:
if hasattr(self, 'account_host'):
self.account_url: str = (
f"https://{self.account_host}"
)
else:
self.account_url: str = (
f"https://{self.account_name}.blob.core.windows.net"
)

elif self.account_name:
self.account_url: str = (
f"https://{self.account_name}.blob.core.windows.net"
)
creds = [self.credential, self.account_key]
if any(creds):
self.service_client = [
Expand Down Expand Up @@ -987,7 +981,7 @@ async def _ls(
outblobs.append(blob_)
elif (
blob_["name"].count("/") == depth
and (hasattr(blob_, "size") and blob_["size"] == 0)
and blob_["size"] == 0
):
outblobs.append(blob_)
else:
Expand Down Expand Up @@ -2074,15 +2068,10 @@ def connect_client(self):
ValueError if none of the connection details are available
"""
try:
if hasattr(self.fs, 'account_host'):
self.fs.account_url: str = (
f"https://{self.fs.account_host}"
)
else:
self.fs.account_url: str = (
f"https://{self.fs.account_name}.blob.core.windows.net"
)

self.fs.account_url: str = (
f"https://{self.fs.account_name}.blob.core.windows.net"
)
creds = [self.fs.sync_credential, self.fs.account_key, self.fs.credential]
if any(creds):
self.container_client = [
Expand Down