Skip to content

Commit b531942

Browse files
author
brentru
committed
switch reset to failure_count
1 parent 79ac648 commit b531942

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/requests_advanced_ethernet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
while not response:
2828
try:
2929
response = requests.get(JSON_GET_URL, headers=headers)
30-
attempts = 0
30+
failure_count = 0
3131
except AssertionError as error:
3232
print("Request failed, retrying...\n", error)
3333
failure_count += 1

examples/requests_simpletest_ethernet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
while not response:
2727
try:
2828
response = requests.get(TEXT_URL)
29-
attempts = 0
29+
failure_count = 0
3030
except AssertionError as error:
3131
print("Request failed, retrying...\n", error)
3232
failure_count += 1
@@ -45,7 +45,7 @@
4545
while not response:
4646
try:
4747
response = requests.get(JSON_GET_URL)
48-
attempts = 0
48+
failure_count = 0
4949
except AssertionError as error:
5050
print("Request failed, retrying...\n", error)
5151
failure_count += 1
@@ -65,7 +65,7 @@
6565
while not response:
6666
try:
6767
response = requests.post(JSON_POST_URL, data=data)
68-
attempts = 0
68+
failure_count = 0
6969
except AssertionError as error:
7070
print("Request failed, retrying...\n", error)
7171
failure_count += 1
@@ -87,7 +87,7 @@
8787
while not response:
8888
try:
8989
response = requests.post(JSON_POST_URL, json=json_data)
90-
attempts = 0
90+
failure_count = 0
9191
except AssertionError as error:
9292
print("Request failed, retrying...\n", error)
9393
failure_count += 1

0 commit comments

Comments
 (0)