Skip to content

Commit

Permalink
comments adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
HailiangZhangNASA committed Dec 21, 2024
1 parent 5b486cd commit 9930d84
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions earthaccess/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,14 +659,17 @@ def _get_granules(

def _clone_session_in_local_thread(
self, original_session: SessionWithHeaderRedirection
) -> SessionWithHeaderRedirection:
"""Creates a new session that replicates the settings of the original session.
) -> None:
"""Clone the original session and store it in the local thread context.
This method creates a new session that replicates the headers, cookies, and authentication settings
from the provided original session. The new session is stored in a thread-local storage.
Parameters:
original_session: The original session object to be cloned
original_session (SessionWithHeaderRedirection): The session to be cloned.
Returns:
A new session that has the same headers, cookies, and auth as the original session.
None
"""
if not hasattr(self.thread_locals, "local_thread_session"):
local_thread_session = SessionWithHeaderRedirection()
Expand Down

0 comments on commit 9930d84

Please sign in to comment.