Skip to content

Commit 6840ba8

Browse files
authored
Merge pull request #59 from DenisaCG/locationNull
Update location extraction logic
2 parents fd86351 + b76c017 commit 6840ba8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

jupyter_drives/manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,13 @@ async def _get_drive_location(self, drive_name):
547547
Args:
548548
drive_name: name of drive to get the region of
549549
"""
550-
location = 'eu-north-1'
550+
location = 'us-east-1'
551551
try:
552552
# set temporary client for location extraction
553553
async with self._s3_session.create_client('s3', aws_secret_access_key=self._config.secret_access_key, aws_access_key_id=self._config.access_key_id, aws_session_token=self._config.session_token) as client:
554554
result = await client.get_bucket_location(Bucket=drive_name)
555-
location = result['LocationConstraint']
555+
if result['LocationConstraint'] is not None:
556+
location = result['LocationConstraint']
556557
except Exception as e:
557558
raise tornado.web.HTTPError(
558559
status_code= httpx.codes.BAD_REQUEST,

0 commit comments

Comments
 (0)