Use python 3.2 compatible exceptions