python try except catch keyboardinterrupt