I have a loop starting with
for i in range(0, 100)
while True inside your for loop, put your
try code inside, and break from that
while loop only when your code succeeds.
for i in range(0,100): while True: try: # do stuff except SomeSpecificException: continue break