Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed Oct 13, 2023
1 parent 335ae89 commit 1a20f87
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions earthaccess/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import threading
from importlib.metadata import version
from typing import Any
import logging

from .api import (
collection_query,
Expand Down Expand Up @@ -63,14 +63,18 @@ def __getattr__(name): # type: ignore
try:
_auth.login(strategy=strategy)
except Exception as e:
logger.debug(f"An error occurred during automatic authentication with {strategy=}: {str(e)}")
logger.debug(
f"An error occurred during automatic authentication with {strategy=}: {str(e)}"
)
continue
else:
if not _auth.authenticated:
continue
else:
_store = Store(_auth)
logger.debug(f"Automatic authentication with {strategy=} was successful")
logger.debug(
f"Automatic authentication with {strategy=} was successful"
)
break
return _auth if name == "__auth__" else _store
else:
Expand Down

0 comments on commit 1a20f87

Please sign in to comment.