title: exit failed script run (python)
body: <p>I have seen several questions about exiting a script after a task is successfully completed, but is there a way to do the same for a script which has failed? I am writing a testing script which just checks that a camera is functioning correctly. If the first test fails it is more than likely that the following tests will also fail; therefore, I want the first failure to invoke an exit and provide output to screen letting me know that there was an error.</p>
  
  <p>I hope this is enough information; let me know if more details are required to help me.</p>