Author: bugman Date: Wed Dec 15 09:41:27 2010 New Revision: 11831 URL: http://svn.gna.org/viewcvs/relax?rev=11831&view=rev Log: The execution lock is released by the interpreter in all Error situations. Modified: 1.3/prompt/interpreter.py Modified: 1.3/prompt/interpreter.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/interpreter.py?rev=11831&r1=11830&r2=11831&view=diff ============================================================================== --- 1.3/prompt/interpreter.py (original) +++ 1.3/prompt/interpreter.py Wed Dec 15 09:41:27 2010 @@ -456,8 +456,11 @@ sys.stdout.write("----------------------------------------------------------------------------------------------------\n") file.close() - # The execution status. - status = True + # The status object. + status = Status() + + # The execution flag. + exec_pass = True # Execute the script. try: @@ -465,6 +468,9 @@ # Catch ctrl-C. except KeyboardInterrupt: + # Unlock execution. + status.exec_lock.release() + # Throw the error. if __main__.debug: raise @@ -474,10 +480,16 @@ sys.stderr.write("\nScript execution cancelled.\n") # The script failed. - status = False + exec_pass = False + + # Unlock execution. + status.exec_lock.release() # Catch the RelaxErrors. except AllRelaxErrors, instance: + # Unlock execution. + status.exec_lock.release() + # Throw the error. if raise_relax_error: raise @@ -493,10 +505,14 @@ sys.stderr.write(instance.__str__()) # The script failed. - status = False + exec_pass = False # Throw all other errors. except: + # Unlock execution. + status.exec_lock.release() + + # Raise the error. raise # Add an empty line to make exiting relax look better. @@ -507,8 +523,8 @@ if quit: sys.exit() - # Return the status. - return status + # Return the execution flag. + return exec_pass def prompt(intro=None, local=None):