Convert exception syntax to Python 3 compatible

This is the Python 3 syntax which is also support in Python 2.6.  So
convert to make porting easier going forward.