From ea33e7412d9775b4dbed8619edbd7389c4dd4a37 Mon Sep 17 00:00:00 2001 From: Omar Ali Date: Mon, 10 Oct 2022 18:03:57 -0700 Subject: [PATCH] Use retries variable Use the retries variable instead of hard coding the number 4. --- EsportsCapsuleFarmer/Rewards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EsportsCapsuleFarmer/Rewards.py b/EsportsCapsuleFarmer/Rewards.py index b88ba1e..a148c10 100644 --- a/EsportsCapsuleFarmer/Rewards.py +++ b/EsportsCapsuleFarmer/Rewards.py @@ -28,7 +28,7 @@ def checkRewards(self, url, retries=5): self.log.info(f"{match} is eligible for rewards ✓") break else: - if i < 4: + if i < retries - 1: self.log.warning(f"{match} is not eligible for rewards. Retrying...") self.driver.refresh() else: