Skip to content

Commit

Permalink
return string instead of boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaS11 committed Jan 8, 2024
1 parent 032880d commit 467689c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions earthaccess/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,14 @@ def auth_environ() -> Dict[str, str]:
return {"EARTHDATA_USERNAME": auth.username, "EARTHDATA_PASSWORD": auth.password}


def in_us_west_2() -> bool:
def in_us_west_2() -> str:
"""Returns true if the user is in AWS region us-west-2
Returns:
bool: boolean indicating if the user is in AWS region us-west-2
str: string indicating if the user is in AWS region us-west-2
"""
return earthaccess.__store__._running_in_us_west_2()
if earthaccess.__store__._running_in_us_west_2() is True:
msg = "You are running in AWS region 'us-west-2'"
else:
msg = "You are not running in AWS region 'us-west-2'"
return msg

0 comments on commit 467689c

Please sign in to comment.