Python Stop Execution If Condition