Fix exception handling setup.py to conform to Python 3