From 9930d8412593657348fb240952ca245e802a3736 Mon Sep 17 00:00:00 2001 From: Hailiang Zhang Date: Sat, 21 Dec 2024 17:26:31 -0500 Subject: [PATCH] comments adjusted --- earthaccess/store.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/earthaccess/store.py b/earthaccess/store.py index 1574e5c4..2b7e23b2 100644 --- a/earthaccess/store.py +++ b/earthaccess/store.py @@ -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()