Could you remove the `as ex`? Python 2.5 compatibility.