@@ -624,10 +624,16 @@ def do_connect(self):
624
624
self .service_client = AIOBlobServiceClient .from_connection_string (
625
625
conn_str = self .connection_string
626
626
)
627
- elif self .account_name :
628
- self .account_url : str = (
629
- f"https://{ self .account_name } .blob.core.windows.net"
630
- )
627
+ elif self .account_name is not None :
628
+ if hasattr (self , 'account_host' ):
629
+ self .account_url : str = (
630
+ f"https://{ self .account_host } "
631
+ )
632
+ else :
633
+ self .account_url : str = (
634
+ f"https://{ self .account_name } .blob.core.windows.net"
635
+ )
636
+
631
637
creds = [self .credential , self .account_key ]
632
638
if any (creds ):
633
639
self .service_client = [
@@ -981,7 +987,7 @@ async def _ls(
981
987
outblobs .append (blob_ )
982
988
elif (
983
989
blob_ ["name" ].count ("/" ) == depth
984
- and blob_ ["size" ] == 0
990
+ and ( hasattr ( blob_ , "size" ) and blob_ ["size" ] == 0 )
985
991
):
986
992
outblobs .append (blob_ )
987
993
else :
@@ -2068,10 +2074,15 @@ def connect_client(self):
2068
2074
ValueError if none of the connection details are available
2069
2075
"""
2070
2076
try :
2077
+ if hasattr (self .fs , 'account_host' ):
2078
+ self .fs .account_url : str = (
2079
+ f"https://{ self .fs .account_host } "
2080
+ )
2081
+ else :
2082
+ self .fs .account_url : str = (
2083
+ f"https://{ self .fs .account_name } .blob.core.windows.net"
2084
+ )
2071
2085
2072
- self .fs .account_url : str = (
2073
- f"https://{ self .fs .account_name } .blob.core.windows.net"
2074
- )
2075
2086
creds = [self .fs .sync_credential , self .fs .account_key , self .fs .credential ]
2076
2087
if any (creds ):
2077
2088
self .container_client = [
0 commit comments