python try catch keyboardinterrupt