uses else clause

Following the recommendations in https://docs.python.org/2/tutorial/errors.html#handling-exceptions