Python try / except keep trying until no errors
<p>I have the following code that occasionally crashes due to a permissions bug.  I am trying to wrap it up in a <code>try / except</code> statement that will keep trying to launch the driver until successful...</p>

<pre><code>def init_driver():
    ffprofile = webdriver.FirefoxProfile("my_profile")
    ffprofile.add_extension(extension="myaddon.xpi")
    return driver

driver = init_driver()
</code></pre>

<p>I have seen examples letting me print a message if an error occurs but how do I get it to keep retrying?  Does anybody have an example they can point me at?</p>