Style nitpick: use "else:" here instead of the If. Then you also don't need to erase module in the except.