From e3aac1675cd9b9b43bf4041c17bc1c39e402e604 Mon Sep 17 00:00:00 2001 From: Greg Hayes Date: Sat, 1 Oct 2022 05:29:03 -0500 Subject: [PATCH] Revert "Support account_host and check blob size attribute exists (#341)" This reverts commit 4e29698870a5b3cb63c3811e24d9ec62d214b899. --- adlfs/spec.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/adlfs/spec.py b/adlfs/spec.py index 74cc6bb7..0b5ed5e3 100644 --- a/adlfs/spec.py +++ b/adlfs/spec.py @@ -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 = [ @@ -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: @@ -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 = [