I know that this is not the most pythonic approach but I have a python script which due to some external effects breaks every 5 to 10 minutes. Now, I want to write a python script which will loop this file (forever), but it should restart the python script when it breaks.
The error is:
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x108994878>)
So how would I program this?
Handle the exception.