Skip to content

Commit

Permalink
Change boto3 region check to use botocore
Browse files Browse the repository at this point in the history
  • Loading branch information
battistowx authored Feb 6, 2024
1 parent 7c5e027 commit f9115fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from uuid import uuid4

import boto3
import botocore.session
import fsspec
import requests
import s3fs
Expand Down Expand Up @@ -141,7 +141,7 @@ def _own_s3_credentials(self, links: List[Dict[str, Any]]) -> Union[str, None]:
return None

def _running_in_us_west_2(self) -> bool:
if (boto3.client('s3').meta.region_name == 'us-west-2'):
if (botocore.session.get_session().get_config_variable('region') == 'us-west-2'):
return True
else:
return False
Expand Down

0 comments on commit f9115fa

Please sign in to comment.