Skip to content

Commit

Permalink
Raise LoginStrategyUnavailable when hostname not found in netrc
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 authored Feb 10, 2025
1 parent f234231 commit bc18781
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion earthaccess/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def _netrc(

creds = my_netrc[self.system.edl_hostname]
if creds is None:
return False
raise LoginStrategyUnavailable(
f"Earthdata Login hostname {self.system.edl_hostname} not found in .netrc file {netrc_loc}"
)

username = creds["login"]
password = creds["password"]
Expand Down

0 comments on commit bc18781

Please sign in to comment.