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 = [