Simple exception handling fixes to conform to Python 3