Fix a bug with python 2.4 handling of the new exception code