Fix except syntax for Python 2.5