Skip to content

Commit

Permalink
Remove unnecessary if
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Jun 5, 2024
1 parent 336523e commit 02c097a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scrapy_zyte_api/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ def update_settings(self, settings: BaseSettings) -> None:
_setdefault(settings, "SCRAPY_POET_PROVIDERS", ZyteApiProvider, 1100)

if settings.getbool("ZYTE_API_SESSION_ENABLED", False):
loaded_retry_policy = retry_policy = settings.get(
retry_policy = settings.get(
"ZYTE_API_RETRY_POLICY", "zyte_api.zyte_api_retrying"
)
if retry_policy is not None:
loaded_retry_policy = load_object(retry_policy)
loaded_retry_policy = load_object(retry_policy)
settings.set(
"ZYTE_API_RETRY_POLICY",
_SESSION_RETRY_POLICIES.get(loaded_retry_policy, retry_policy),
Expand Down

0 comments on commit 02c097a

Please sign in to comment.