@@ -47,9 +47,7 @@ class JupyterDrivesManager():
4747 It needs them to extract the ``DrivesConfig``.
4848 """
4949 def __init__ (self , config : traitlets .config .Config ) -> None :
50- print ("[DEBUG] JupyterDrivesManager.__init__() called11" )
5150 self ._config = DrivesConfig (config = config )
52- print ("[DEBUG] JupyterDrivesManager.__init__() config loaded" , self ._config )
5351 self ._client = httpx .AsyncClient ()
5452 self ._content_managers = {}
5553 self ._max_files_listed = 1025
@@ -699,20 +697,22 @@ async def check_file(self, drive_name, path):
699697
700698 async def new_drive (self , new_drive_name , location ):
701699 """Create a new drive in the given location.
702-
700+
703701 Args:
704702 new_drive_name: name of new drive to create
705703 location: (optional) region of bucket
706704 """
705+ location = location or 'us-east-1'
706+
707707 try :
708708 # Create a region-specific S3 client for bucket creation
709709 # This ensures the client matches the target region
710710 async with self ._s3_session .create_client (
711- 's3' ,
712- aws_secret_access_key = self ._config .secret_access_key ,
713- aws_access_key_id = self ._config .access_key_id ,
711+ 's3' ,
712+ aws_secret_access_key = self ._config .secret_access_key ,
713+ aws_access_key_id = self ._config .access_key_id ,
714714 aws_session_token = self ._config .session_token ,
715- region_name = location # Use the target region
715+ region_name = location
716716 ) as client :
717717 if location == 'us-east-1' :
718718 # For us-east-1, don't specify location constraint
@@ -728,7 +728,7 @@ async def new_drive(self, new_drive_name, location):
728728 status_code = httpx .codes .BAD_REQUEST ,
729729 reason = f"The following error occured when creating the new drive: { e } " ,
730730 )
731-
731+
732732 return
733733
734734 async def add_public_drive (self , drive_name ):
0 commit comments