python try and except with colon