Fix exception handling sytanx to work on Python 2.5.x also.