Fix missing exception in Python 2.6