I commonly see things like this in a try except, though I don't necessarily like it.