Skip to content

Commit 11e1edb

Browse files
Minor changes and conditional fix
1 parent 8b25b71 commit 11e1edb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

segment/analytics/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def send_request():
152152
timeout=self.timeout, batch=batch, proxies=self.proxies,
153153
oauth_manager=self.oauth_manager)
154154
except Exception as e:
155-
if attempt_count > self.retries:
155+
if attempt_count >= self.retries + 1:
156156
self.log.error(f"All {self.retries} retries exhausted. Final error: {e}")
157157
raise
158158

segment/analytics/request.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def post(write_key, host=None, gzip=False, timeout=15, proxies=None, oauth_manag
5454
try:
5555
res = _session.post(url, **kwargs)
5656
except Exception as e:
57-
# log.error(e)
5857
raise e
5958

6059
if res.status_code == 200:

0 commit comments

Comments
 (0)