use py2.4 compatible except form