Python sys.exit() help?
<p>I am working in Python and am trying to have a line of code execute and after it executes I am calling <code>sys.exit()</code> to have the script itself "exit." However, it seems that <code>sys.exit()</code> is executing before the line of code above it executes. Below is the code I am trying to implement:</p>

<pre><code>if something == True:
    self.redirect('http://www.google.com/')
    sys.exit()
</code></pre>

<p>The script is exiting before it is redirecting. I need the redirect to complete and then have sys.exit() execute. I CANNOT use the sleep command due to nature of the other code being implemented. Can anyone give me some help as how to fix/workaround this issue?</p>
