File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def __init__(self, config: traitlets.config.Config) -> None:
5252 self ._content_managers = {}
5353 self ._max_files_listed = 1025
5454 self ._drives = None
55- self ._external_drives = []
55+ self ._external_drives = {}
5656
5757 # instate fsspec file system
5858 self ._file_system = fsspec .filesystem (self ._config .provider , asynchronous = True )
@@ -207,10 +207,10 @@ async def list_drives(self):
207207 )
208208
209209 if len (self ._external_drives ) != 0 :
210- for drive in self ._external_drives :
210+ for drive in self ._external_drives . values () :
211211 try :
212212 data .append ({
213- "name" : drive ['name ' ],
213+ "name" : drive ['url ' ],
214214 "region" : self ._config .region_name ,
215215 "creationDate" : datetime .now ().isoformat (timespec = 'milliseconds' ).replace ('+00:00' , 'Z' ),
216216 "mounted" : False if result .name not in self ._content_managers else True ,
@@ -651,9 +651,9 @@ async def add_public_drive(self, drive_name):
651651 try :
652652 drive = {
653653 "is_public" : True ,
654- "name " : drive_name
654+ "url " : drive_name
655655 };
656- self ._external_drives . append ( drive ) ;
656+ self ._external_drives [ drive_name ] = drive ;
657657 except Exception as e :
658658 raise tornado .web .HTTPError (
659659 status_code = httpx .codes .BAD_REQUEST ,
You can’t perform that action at this time.
0 commit comments