I have a python script which is a little unstable and gives an SSL error every now and then. The exception is raised by some function buried deep within some library so there is essentially no fix to it.
I have implemented a hacky solution by creating a shell script with a while loop that runs a large number of times and executing the python script from within that loop.
Now what I'm hoping is that as an iteration of the loop starts and the script is executed, the loop inside the shell script stays where it is until the python script fails and the next iteration of the loop re-executes the script and so on.
Is doing it like this efficient? Is there a better way to do it? and most importantly is it correct?